You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/validate/utils.go
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,16 @@ import (
11
11
)
12
12
13
13
funccompareIPs(expectedmap[string]string, actual []string) error {
14
-
iflen(expected) !=len(actual) {
15
-
returnerrors.Errorf("len of expected IPs != len of actual IPs, expected: %+v, actual: %+v", expected, actual)
16
-
}
14
+
expectedLen:=len(expected)
17
15
18
16
for_, ip:=rangeactual {
19
17
if_, ok:=expected[ip]; !ok {
20
18
returnerrors.Errorf("actual ip %s is unexpected, expected: %+v, actual: %+v", ip, expected, actual)
21
19
}
20
+
delete(expected, ip)
21
+
}
22
+
ifexpectedLen!=len(actual) {
23
+
returnerrors.Errorf("len of expected IPs != len of actual IPs, expected: %+v, actual: %+v | Remaining, potentially leaked, IP(s) on state file - %v", expectedLen, len(actual), expected)
// We are restarting the systmemd network and checking that the connectivity works after the restart. For more details: https://github.com/cilium/cilium/issues/18706
101
106
log.Printf("Validating the restart network scenario")
102
-
err=v.ValidateRestartNetwork(ctx)
107
+
err=v.validateRestartNetwork(ctx)
103
108
iferr!=nil {
104
109
returnerrors.Wrapf(err, "failed to validate restart network scenario")
0 commit comments