(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func TestBuildAgentCache_disabled(t *testing.T) { |
| 14 | t.Parallel() |
| 15 | cases := []struct { |
| 16 | name string |
| 17 | cfg *latest.CacheConfig |
| 18 | }{ |
| 19 | {"nil config", nil}, |
| 20 | {"explicitly disabled", &latest.CacheConfig{Enabled: false}}, |
| 21 | } |
| 22 | for _, tc := range cases { |
| 23 | t.Run(tc.name, func(t *testing.T) { |
| 24 | c, err := buildAgentCache("agent", tc.cfg, t.TempDir()) |
| 25 | require.NoError(t, err) |
| 26 | assert.Nil(t, c) |
| 27 | }) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func TestBuildAgentCache_inMemory(t *testing.T) { |
| 32 | t.Parallel() |
nothing calls this directly
no test coverage detected