(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func 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 | |
| 52 | func TestBuildAgentCache_absolutePath(t *testing.T) { |
| 53 | t.Parallel() |
nothing calls this directly
no test coverage detected