From 2d77d9a5a925c158673f6b64d501c1087e3e1bce Mon Sep 17 00:00:00 2001 From: Dmitry Rozhkov Date: Wed, 10 Apr 2019 15:09:12 +0300 Subject: [PATCH] kubeadm: use correct expected key when checking test results Resulting key needs to be compared with the expected key which was set for the test case, not just a key. --- cmd/kubeadm/app/phases/certs/certs_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/phases/certs/certs_test.go b/cmd/kubeadm/app/phases/certs/certs_test.go index 20bf5d4a74d..a77a33f95de 100644 --- a/cmd/kubeadm/app/phases/certs/certs_test.go +++ b/cmd/kubeadm/app/phases/certs/certs_test.go @@ -364,7 +364,7 @@ func TestWriteKeyFilesIfNotExist(t *testing.T) { } //TODO: check if there is a better method to compare keys - if resultingKey.D == key.D { + if resultingKey.D == test.expectedKey.D { t.Error("created key does not match expected key") } }