MCPcopy Create free account
hub / github.com/zalando/skipper / createFileWith

Function createFileWith

eskipfile/watch_test.go:48–64  ·  view source on GitHub ↗
(content string, t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func createFileWith(content string, t *testing.T) {
49 tmpfile, err := os.Create(testWatchFile + ".tmp")
50 if err != nil {
51 t.Fatal(err)
52 }
53 defer os.Remove(tmpfile.Name())
54
55 _, err = tmpfile.WriteString(content)
56 if err != nil {
57 t.Fatal(err)
58 }
59
60 err = os.Rename(tmpfile.Name(), testWatchFile)
61 if err != nil {
62 t.Fatal(err)
63 }
64}
65
66func createFile(t *testing.T) {
67 createFileWith(testWatchFileContent, t)

Callers 3

createFileFunction · 0.85
invalidFileFunction · 0.85
updateFileFunction · 0.85

Calls 3

CreateMethod · 0.65
NameMethod · 0.65
WriteStringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…