(t *testing.T)
| 186 | } |
| 187 | |
| 188 | func TestComputeFirewallDiff_Run1Nil(t *testing.T) { |
| 189 | run2 := &FirewallAnalysis{ |
| 190 | RequestsByDomain: map[string]DomainRequestStats{ |
| 191 | "api.github.com:443": {Allowed: 5, Blocked: 0}, |
| 192 | }, |
| 193 | } |
| 194 | |
| 195 | diff := computeFirewallDiff(100, 200, nil, run2) |
| 196 | |
| 197 | assert.Len(t, diff.NewDomains, 1, "All run2 domains should be new") |
| 198 | assert.Equal(t, "api.github.com:443", diff.NewDomains[0].Domain, "New domain should be api.github.com") |
| 199 | } |
| 200 | |
| 201 | func TestComputeFirewallDiff_Run2Nil(t *testing.T) { |
| 202 | run1 := &FirewallAnalysis{ |
nothing calls this directly
no test coverage detected