MCPcopy Index your code
hub / github.com/github/gh-aw / TestIsEmptyDiff

Function TestIsEmptyDiff

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

Source from the content-addressed store, hash-verified

339}
340
341func TestIsEmptyDiff(t *testing.T) {
342 emptyDiff := &FirewallDiff{}
343 assert.True(t, isEmptyFirewallDiff(emptyDiff), "Empty diff should be detected")
344
345 nonEmptyDiff := &FirewallDiff{
346 NewDomains: []DomainDiffEntry{{Domain: "test.com"}},
347 }
348 assert.False(t, isEmptyFirewallDiff(nonEmptyDiff), "Non-empty diff should not be detected as empty")
349}
350
351// findDiffEntry is a test helper to find a domain in a list of diff entries
352func findDiffEntry(entries []DomainDiffEntry, domain string) *DomainDiffEntry {

Callers

nothing calls this directly

Calls 1

isEmptyFirewallDiffFunction · 0.85

Tested by

no test coverage detected