(t *testing.T)
| 212 | } |
| 213 | |
| 214 | func TestComputeFirewallDiff_NoChanges(t *testing.T) { |
| 215 | stats := map[string]DomainRequestStats{ |
| 216 | "api.github.com:443": {Allowed: 5, Blocked: 0}, |
| 217 | } |
| 218 | run1 := &FirewallAnalysis{RequestsByDomain: stats} |
| 219 | run2 := &FirewallAnalysis{RequestsByDomain: stats} |
| 220 | |
| 221 | diff := computeFirewallDiff(100, 200, run1, run2) |
| 222 | |
| 223 | assert.Empty(t, diff.NewDomains, "Should have no new domains") |
| 224 | assert.Empty(t, diff.RemovedDomains, "Should have no removed domains") |
| 225 | assert.Empty(t, diff.StatusChanges, "Should have no status changes") |
| 226 | assert.Empty(t, diff.VolumeChanges, "Should have no volume changes") |
| 227 | } |
| 228 | |
| 229 | func TestComputeFirewallDiff_CompleteScenario(t *testing.T) { |
| 230 | run1 := &FirewallAnalysis{ |
nothing calls this directly
no test coverage detected