MCPcopy
hub / github.com/redspread/spread / TestSourceObjectsEmptyKubeDir

Function TestSourceObjectsEmptyKubeDir

pkg/input/dir/source_test.go:39–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

37}
38
39func TestSourceObjectsEmptyKubeDir(t *testing.T) {
40 fs := testTempFileSource(t)
41 defer os.RemoveAll(string(fs))
42
43 kubeDir := path.Join(string(fs), ObjectsDir)
44 err := os.Mkdir(kubeDir, 0777)
45 if err != nil {
46 t.Fatal(err)
47 }
48
49 objects, err := fs.Objects()
50 assert.NoError(t, err, "should be okay")
51 assert.Len(t, objects, 0, "should not have any objects")
52}
53
54func TestSourceObjectsKubeDir(t *testing.T) {
55 fs := testTempFileSource(t)

Callers

nothing calls this directly

Calls 3

testTempFileSourceFunction · 0.85
ObjectsMethod · 0.65
LenMethod · 0.45

Tested by

no test coverage detected