Files
kopia/cli/command_maintenance_info_test.go
Julio Lopez 06a997385a cli: include parameters in maintenance info JSON output (#981)
* cli: include parameters in maintenance info JSON output
* e2e: add maintenance info checks in e2e test
* cli: simple test for 'maintenance info --json' command
2021-09-10 17:51:55 -07:00

23 lines
616 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 TestMaintenanceInfoSimple(t *testing.T) {
t.Parallel()
e := testenv.NewCLITest(t, testenv.RepoFormatNotImportant, testenv.NewInProcRunner(t))
defer e.RunAndExpectSuccess(t, "repo", "disconnect")
var mi cli.MaintenanceInfo
e.RunAndExpectSuccess(t, "repo", "create", "filesystem", "--path", e.RepoDir)
e.RunAndExpectSuccess(t, "maintenance", "info")
testutil.MustParseJSONLines(t, e.RunAndExpectSuccess(t, "maintenance", "info", "--json"), &mi)
}