E2E test for kubectl version

pull/6/head
Marcin Wielgus 2015-07-23 14:15:15 +02:00
parent 8f3c3108b8
commit 0a9a8aa45e
1 changed files with 12 additions and 0 deletions

View File

@ -283,6 +283,18 @@ var _ = Describe("Kubectl client", func() {
}) })
}) })
}) })
Describe("Kubectl version", func() {
It("should check is all data is printed", func() {
version := runKubectl("version")
requiredItems := []string{"Client Version:", "Server Version:", "Major:", "Minor:", "GitCommit:"}
for _, item := range requiredItems {
if !strings.Contains(version, item) {
Failf("Required item %s not found in %s", item, version)
}
}
})
})
}) })
func curl(addr string) (string, error) { func curl(addr string) (string, error) {