mirror of
https://github.com/kopia/kopia.git
synced 2025-12-23 22:57:50 -05:00
* cli: include parameters in maintenance info JSON output * e2e: add maintenance info checks in e2e test * cli: simple test for 'maintenance info --json' command
23 lines
616 B
Go
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)
|
|
}
|