MCPcopy Index your code
hub / github.com/cheat/cheat / TestWriteableNotOK

Function TestWriteableNotOK

internal/cheatpath/writeable_test.go:34–50  ·  view source on GitHub ↗

TestWriteableOK asserts that Writeable returns an error when no writeable cheatpaths exist

(t *testing.T)

Source from the content-addressed store, hash-verified

32// TestWriteableOK asserts that Writeable returns an error when no writeable
33// cheatpaths exist
34func TestWriteableNotOK(t *testing.T) {
35
36 // initialize some cheatpaths
37 cheatpaths := []Path{
38 Path{Path: "/foo", ReadOnly: true},
39 Path{Path: "/bar", ReadOnly: true},
40 Path{Path: "/baz", ReadOnly: true},
41 }
42
43 // get the writeable cheatpath
44 _, err := Writeable(cheatpaths)
45
46 // assert that no errors were returned
47 if err == nil {
48 t.Errorf("failed to return an error when no writeable paths found")
49 }
50}

Callers

nothing calls this directly

Calls 1

WriteableFunction · 0.85

Tested by

no test coverage detected