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

Function testWriteYAMLToFile

pkg/input/dir/source_test.go:317–327  ·  view source on GitHub ↗

TODO: Add test for file

(t *testing.T, filename string, typ interface{})

Source from the content-addressed store, hash-verified

315// TODO: Add test for file
316
317func testWriteYAMLToFile(t *testing.T, filename string, typ interface{}) {
318 jsonBytes, err := yaml.Marshal(typ)
319 if err != nil {
320 t.Fatal(err)
321 }
322
323 err = ioutil.WriteFile(filename, jsonBytes, TestFilePerms)
324 if err != nil {
325 t.Fatal(err)
326 }
327}
328
329func testTempFileSource(t *testing.T) FileSource {
330 dir := testTempDir(t)

Callers 8

TestInputPodFunction · 0.85
TestInputRCAndPodFunction · 0.85
testWriteRandomObjectsFunction · 0.85
TestSourceObjectsKubeDirFunction · 0.85
TestSourceRCsFunction · 0.85
TestSourcePodsFunction · 0.85
TestSourceContainersDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected