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

Function TestComputeFirewallDiff_Run2Nil

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

Source from the content-addressed store, hash-verified

199}
200
201func 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
214func TestComputeFirewallDiff_NoChanges(t *testing.T) {
215 stats := map[string]DomainRequestStats{

Callers

nothing calls this directly

Calls 1

computeFirewallDiffFunction · 0.85

Tested by

no test coverage detected