Fixing a lot of string formatting issues with regards to:
* Improper format specifier (e.g. %s for bools or %s for ints) * More or less parameters than format specifiers * Not calling a formatting function when it should have (e.g. Error() instead of Errorf())
This commit is contained in:
@@ -267,11 +267,11 @@ func TestGetIndexedIPSubnetTooSmall(t *testing.T) {
|
||||
_, subnet, _ := net.ParseCIDR(testCase.subnet)
|
||||
secondIP, err := GetIndexedIP(subnet, 2)
|
||||
if err == nil {
|
||||
t.Errorf("Expected error but no error occured for subnet: ", testCase.subnet)
|
||||
t.Errorf("Expected error but no error occured for subnet: %s", testCase.subnet)
|
||||
}
|
||||
thirdIP, err := GetIndexedIP(subnet, 3)
|
||||
if err == nil {
|
||||
t.Errorf("Expected error but no error occured for subnet: ", testCase.subnet)
|
||||
t.Errorf("Expected error but no error occured for subnet: %s", testCase.subnet)
|
||||
}
|
||||
if secondIP != nil {
|
||||
t.Errorf("Unexpected second IP: Expected nil Actual <%q>", thirdIP.String())
|
||||
|
@@ -603,7 +603,7 @@ func TestServiceRegistryIPUpdate(t *testing.T) {
|
||||
|
||||
_, _, err := rest.Update(ctx, update)
|
||||
if err == nil || !errors.IsInvalid(err) {
|
||||
t.Error("Unexpected error type: %v", err)
|
||||
t.Errorf("Unexpected error type: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user