Skip to content

Commit

Permalink
Avoid cuddling expressions with blocks
Browse files Browse the repository at this point in the history
These were caught by golangci-lint 1.60.1.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
  • Loading branch information
skitt authored and tpantelis committed Aug 20, 2024
1 parent ee14df9 commit 3809fff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/ipam/ippool.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (p *IPPool) Reserve(ips ...string) error {
for i := 0; i < num; i++ {
p.available.Remove(intIPs[i])
}

metrics.RecordAllocateGlobalIPs(p.cidr, num)

return nil
Expand Down
2 changes: 2 additions & 0 deletions test/external/dataplane/gn_connectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ func testGlobalNetExternalConnectivity(p testParams, g globalnetTestParams) {
for i := 1; i < len(extEgressGlobalIPs); i++ {
matchRegexp = Or(matchRegexp, MatchRegexp("%s .*GET /%s%s .*", extEgressGlobalIPs[i], p.Framework.Namespace, clusterName))
}

Expect(podLog).To(matchRegexp)
case Headless:
// For access from headless service, source IP is the globalIngressIP of the external app
Expand Down Expand Up @@ -399,6 +400,7 @@ func testGlobalNetExternalConnectivity(p testParams, g globalnetTestParams) {
for i := 1; i < len(podGlobalIPs); i++ {
matchRegexp = Or(matchRegexp, MatchRegexp("%s .*GET /%s%s .*", podGlobalIPs[i], p.Framework.Namespace, clusterName))
}

Expect(dockerLog).To(matchRegexp)
case tcp.GlobalPodIP:
// For access from headless service, source IP is the globalIngressIP of the pod, which is set to remoteIP
Expand Down

0 comments on commit 3809fff

Please sign in to comment.