Skip to content

Commit 4603c23

Browse files
Merge pull request #101 from nocturnalastro/better_role_error_log
tests: Improve logging message when incorrect log is found
2 parents bdf9800 + 8d33a28 commit 4603c23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/pkg/metrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func CheckClockRole(roles []MetricRole, Ifs []string, nodeName *string) (err err
148148
return fmt.Errorf("error strconv for roleString=%s, err:%s", roleString, err)
149149
}
150150
if MetricRole(roleInt) != roles[index] {
151-
return fmt.Errorf(fmt.Sprintf("incorrect role, role expected=%d, role observed=%d(%s)", roles[index], roleInt, roleString))
151+
return fmt.Errorf(fmt.Sprintf("incorrect role, role expected=%d(%s), role observed=%d(%s)", roles[index], roles[index].String(), roleInt, MetricRole(roleInt).String()))
152152
}
153153
}
154154
return nil

0 commit comments

Comments
 (0)