(t *testing.T)
| 199 | } |
| 200 | |
| 201 | func TestComputeFirewallDiff_Run2Nil(t *testing.T) { |
| 202 | run1 := &FirewallAnalysis{ |
| 203 | RequestsByDomain: map[string]DomainRequestStats{ |
| 204 | "api.github.com:443": {Allowed: 5, Blocked: 0}, |
| 205 | }, |
| 206 | } |
| 207 | |
| 208 | diff := computeFirewallDiff(100, 200, run1, nil) |
| 209 | |
| 210 | assert.Len(t, diff.RemovedDomains, 1, "All run1 domains should be removed") |
| 211 | assert.Equal(t, "api.github.com:443", diff.RemovedDomains[0].Domain, "Removed domain should be api.github.com") |
| 212 | } |
| 213 | |
| 214 | func TestComputeFirewallDiff_NoChanges(t *testing.T) { |
| 215 | stats := map[string]DomainRequestStats{ |
nothing calls this directly
no test coverage detected