mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +00:00
20 lines
409 B
Go
20 lines
409 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"strings"
|
|
"testing"
|
|
|
|
rtest "github.com/restic/restic/internal/test"
|
|
)
|
|
|
|
func testRunLs(t testing.TB, gopts GlobalOptions, snapshotID string) []string {
|
|
buf, err := withCaptureStdout(func() error {
|
|
gopts.Quiet = true
|
|
opts := LsOptions{}
|
|
return runLs(context.TODO(), opts, gopts, []string{snapshotID})
|
|
})
|
|
rtest.OK(t, err)
|
|
return strings.Split(buf.String(), "\n")
|
|
}
|