MCPcopy Index your code
hub / github.com/docker/docker-agent / TestBuildAgentCache_relativePath

Function TestBuildAgentCache_relativePath

pkg/teamloader/cache_test.go:38–50  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestBuildAgentCache_relativePath(t *testing.T) {
39 t.Parallel()
40 parent := t.TempDir()
41 c, err := buildAgentCache("agent",
42 &latest.CacheConfig{Enabled: true, Path: "cache.json"}, parent)
43 require.NoError(t, err)
44 require.NotNil(t, c)
45
46 // Storing must persist to <parent>/cache.json
47 c.Store("q", "a")
48 _, err = filepath.Abs(filepath.Join(parent, "cache.json"))
49 require.NoError(t, err)
50}
51
52func TestBuildAgentCache_absolutePath(t *testing.T) {
53 t.Parallel()

Callers

nothing calls this directly

Calls 2

buildAgentCacheFunction · 0.85
StoreMethod · 0.45

Tested by

no test coverage detected