mirror of
https://github.com/kopia/kopia.git
synced 2026-01-31 01:33:12 -05:00
* cleanup(repository) add kopia:sensitive tag to content.FormattingOptions field * feat(cli): add --json output to command
24 lines
601 B
Go
24 lines
601 B
Go
package cli_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/kopia/kopia/cli"
|
|
"github.com/kopia/kopia/internal/testutil"
|
|
"github.com/kopia/kopia/tests/testenv"
|
|
)
|
|
|
|
func TestRepoStatusJSON(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
e := testenv.NewCLITest(t, testenv.RepoFormatNotImportant, testenv.NewInProcRunner(t))
|
|
|
|
var rs cli.RepositoryStatus
|
|
|
|
e.RunAndExpectSuccess(t, "repo", "create", "filesystem", "--path", e.RepoDir)
|
|
defer e.RunAndExpectSuccess(t, "repo", "disconnect")
|
|
|
|
e.RunAndExpectSuccess(t, "repo", "status")
|
|
testutil.MustParseJSONLines(t, e.RunAndExpectSuccess(t, "repo", "status", "--json"), &rs)
|
|
}
|