Files
kopia/cli/command_repo_status_test.go
Julio Lopez 3f9e27c97b feat(cli): add --json output to 'repo status' command (#1834)
* cleanup(repository) add kopia:sensitive tag to content.FormattingOptions field

* feat(cli): add --json output to  command
2022-03-17 22:22:24 -07:00

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)
}