MCPcopy
hub / github.com/kopia/kopia / TestSnapshotEstimate_NotADirectory

Function TestSnapshotEstimate_NotADirectory

cli/command_snapshot_estimate_test.go:49–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestSnapshotEstimate_NotADirectory(t *testing.T) {
50 env := testenv.NewCLITest(t, testenv.RepoFormatNotImportant, testenv.NewInProcRunner(t))
51
52 dir := testutil.TempDirectory(t)
53 require.NoError(t, os.WriteFile(filepath.Join(dir, "file1.txt"), []byte{1, 2, 3}, 0o600))
54
55 env.RunAndExpectSuccess(t, "repo", "create", "filesystem", "--path", env.RepoDir)
56 env.RunAndExpectFailure(t, "snapshot", "estimate", filepath.Join(dir, "file1.txt"))
57}

Callers

nothing calls this directly

Calls 6

RunAndExpectSuccessMethod · 0.95
RunAndExpectFailureMethod · 0.95
NewCLITestFunction · 0.92
NewInProcRunnerFunction · 0.92
TempDirectoryFunction · 0.92
WriteFileMethod · 0.65

Tested by

no test coverage detected