MCPcopy
hub / github.com/kopia/kopia / mustCreateSource

Function mustCreateSource

internal/server/util_test.go:18–26  ·  view source on GitHub ↗
(t *testing.T, cli *apiclient.KopiaAPIClient, path string, pol *policy.Policy)

Source from the content-addressed store, hash-verified

16)
17
18func mustCreateSource(t *testing.T, cli *apiclient.KopiaAPIClient, path string, pol *policy.Policy) {
19 t.Helper()
20
21 _, err := serverapi.CreateSnapshotSource(testlogging.Context(t), cli, &serverapi.CreateSnapshotSourceRequest{
22 Path: path,
23 Policy: pol,
24 })
25 require.NoError(t, err)
26}
27
28func mustSetPolicy(t *testing.T, cli *apiclient.KopiaAPIClient, si snapshot.SourceInfo, pol *policy.Policy) {
29 t.Helper()

Callers 2

TestSnapshotCountersFunction · 0.85

Calls 3

CreateSnapshotSourceFunction · 0.92
ContextFunction · 0.92
HelperMethod · 0.80

Tested by

no test coverage detected