Skip to content

removing function AnalyzeNACLRules and fix tests #932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

olasaadi99
Copy link
Contributor

No description provided.

@olasaadi99 olasaadi99 requested review from zivnevo and adisos November 27, 2024 14:09
@olasaadi99 olasaadi99 linked an issue Nov 27, 2024 that may be closed by this pull request
@olasaadi99 olasaadi99 mentioned this pull request Nov 27, 2024
@olasaadi99
Copy link
Contributor Author

this branch is included in #933

Comment on lines +320 to +342
fmt.Printf("ipBlockString: %v\n", ipBlockString)
fmt.Printf("connectivityResult.AllowedConns: \n")
for ipRange, conn := range connectivityResult.AllowedConns {
fmt.Printf("ipRange.ToIPRanges(): %v\n", ipRange.ToIPRanges())
fmt.Printf("conn: %v\n", conn)
}

//nolint:all
/*src := common.FromCidr("1.1.1.1/32")
dst := common.FromCidr("10.0.0.0/24")
disjointPeers := []*netset.IPBlock{dst}
res := commonvpc.GetAllowedXgressConnections(rulesTest1, src, dst, disjointPeers, true)
for d, c := range res {
fmt.Printf("%s => %s : %s\n", src.ToIPAdress(), d, c.String())
require.True(t, c.Equal(getAllConnSet()))
}*/
fmt.Printf("connectivityResult.AllowRules: \n")
for ipRange, conn := range connectivityResult.AllowRules {
fmt.Printf("ipRange.ToIPRanges(): %v\n", ipRange.ToIPRanges())
fmt.Printf("conn: %v\n", conn)
}
fmt.Printf("connectivityResult.DeniedConns: \n")
for ipRange, conn := range connectivityResult.DeniedConns {
fmt.Printf("ipRange.ToIPRanges(): %v\n", ipRange.ToIPRanges())
fmt.Printf("conn: %v\n", conn)
}

fmt.Printf("done\n")
fmt.Printf("connectivityResult.DenyRules: \n")
for ipRange, conn := range connectivityResult.DenyRules {
fmt.Printf("ipRange.ToIPRanges(): %v\n", ipRange.ToIPRanges())
fmt.Printf("conn: %v\n", conn)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all these prints?
We already have huge logs for our tests - it makes it hard to search for failures.
So unless there is a failure, I prefer tests to produce only very little text if at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed
removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in #933

@olasaadi99 olasaadi99 closed this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NACL analysis - consider removing function AnalyzeNACLRules
3 participants