Remove unnecessary sprintf in node status tests

There is no invocation to sprintf needed for those strings so we can
remove them.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert 2020-04-01 14:16:25 +02:00
parent e39aa99c73
commit 2dfb22b5b7
No known key found for this signature in database
GPG Key ID: 8CE029DD1A866E52

View File

@ -224,7 +224,7 @@ func TestUpdateNewNodeStatus(t *testing.T) {
Type: v1.NodeMemoryPressure,
Status: v1.ConditionFalse,
Reason: "KubeletHasSufficientMemory",
Message: fmt.Sprintf("kubelet has sufficient memory available"),
Message: "kubelet has sufficient memory available",
LastHeartbeatTime: metav1.Time{},
LastTransitionTime: metav1.Time{},
},
@ -232,7 +232,7 @@ func TestUpdateNewNodeStatus(t *testing.T) {
Type: v1.NodeDiskPressure,
Status: v1.ConditionFalse,
Reason: "KubeletHasNoDiskPressure",
Message: fmt.Sprintf("kubelet has no disk pressure"),
Message: "kubelet has no disk pressure",
LastHeartbeatTime: metav1.Time{},
LastTransitionTime: metav1.Time{},
},
@ -240,7 +240,7 @@ func TestUpdateNewNodeStatus(t *testing.T) {
Type: v1.NodePIDPressure,
Status: v1.ConditionFalse,
Reason: "KubeletHasSufficientPID",
Message: fmt.Sprintf("kubelet has sufficient PID available"),
Message: "kubelet has sufficient PID available",
LastHeartbeatTime: metav1.Time{},
LastTransitionTime: metav1.Time{},
},
@ -248,7 +248,7 @@ func TestUpdateNewNodeStatus(t *testing.T) {
Type: v1.NodeReady,
Status: v1.ConditionTrue,
Reason: "KubeletReady",
Message: fmt.Sprintf("kubelet is posting ready status"),
Message: "kubelet is posting ready status",
LastHeartbeatTime: metav1.Time{},
LastTransitionTime: metav1.Time{},
},