MCPcopy Create free account
hub / github.com/dagger/dagger / TestOpenWithNonDirRoot

Function TestOpenWithNonDirRoot

engine/clientdb/dbs_test.go:79–87  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

77}
78
79func TestOpenWithNonDirRoot(t *testing.T) {
80 root := t.TempDir()
81 blocker := root + "/not-a-dir"
82 require.NoError(t, os.WriteFile(blocker, []byte("nope"), 0600))
83
84 dbs := NewDBs(blocker)
85 _, err := dbs.Open(t.Context(), "client1")
86 require.Error(t, err)
87}

Callers

nothing calls this directly

Calls 5

OpenMethod · 0.95
NewDBsFunction · 0.85
ContextMethod · 0.65
WriteFileMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected