MCPcopy Create free account
hub / github.com/github/gh-aw / TestComputeFirewallDiff_NoChanges

Function TestComputeFirewallDiff_NoChanges

pkg/cli/audit_diff_test.go:214–227  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

212}
213
214func 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
229func TestComputeFirewallDiff_CompleteScenario(t *testing.T) {
230 run1 := &FirewallAnalysis{

Callers

nothing calls this directly

Calls 1

computeFirewallDiffFunction · 0.85

Tested by

no test coverage detected