Fix failure message of e2e test about kubectl

At e2e test for "apply set/view last-applied",
failure message is `Missing "replicas": 2 in kubectl
view-last-applied`, in spite of `replicas` key is contained.
This changes `Missing` to `Presenting`.
This commit is contained in:
Akihito INOH 2018-09-06 09:28:13 +09:00
parent ca43f007a3
commit f965d55eae

View File

@ -799,11 +799,11 @@ metadata:
By("apply file doesn't have replicas")
framework.RunKubectlOrDieInput(deployment2Yaml, "apply", "set-last-applied", "-f", "-", nsFlag)
By("check last-applied has been updated, annotations doesn't replicas")
By("check last-applied has been updated, annotations doesn't have replicas")
output = framework.RunKubectlOrDieInput(deployment1Yaml, "apply", "view-last-applied", "-f", "-", nsFlag, "-o", "json")
requiredString = "\"replicas\": 2"
if strings.Contains(output, requiredString) {
framework.Failf("Missing %s in kubectl view-last-applied", requiredString)
framework.Failf("Presenting %s in kubectl view-last-applied", requiredString)
}
By("scale set replicas to 3")