MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / TestAppendToFileFallback_NewFile

Function TestAppendToFileFallback_NewFile

cli/cmd/summary_test.go:35–44  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestAppendToFileFallback_NewFile(t *testing.T) {
36 f := filepath.Join(t.TempDir(), "summary.json")
37
38 err := appendToFileFallback(f, []byte("line1\n"))
39 require.NoError(t, err)
40
41 got, err := os.ReadFile(f)
42 require.NoError(t, err)
43 require.Equal(t, "line1\n", string(got))
44}

Callers

nothing calls this directly

Calls 1

appendToFileFallbackFunction · 0.85

Tested by

no test coverage detected