MCPcopy Create free account
hub / github.com/evilsocket/sum / canWriteOnRoot

Function canWriteOnRoot

storage/loader_test.go:67–74  ·  view source on GitHub ↗

ugly but better than writing platform specific implementations

()

Source from the content-addressed store, hash-verified

65
66// ugly but better than writing platform specific implementations
67func canWriteOnRoot() bool {
68 testFile := "/root/.sum.w.test"
69 if err := ioutil.WriteFile(testFile, []byte{0x00}, 0755); err == nil {
70 os.Remove(testFile)
71 return true
72 }
73 return false
74}
75
76func TestLoaderListPath(t *testing.T) {
77 setupRawRecords(t)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected