-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added check for forceupdate and a check for which version of kubectl …
…is getting downloaded in test cases
- Loading branch information
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr'); | ||
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`Got kubectl version v1.7.0`) != -1, "Got the specific version of kubectl"); | ||
assert(tr.stdout.indexOf(`Downloaded kubectl`) != -1, "Downloaded correct version of kubectl"); | ||
assert(tr.stdout.indexOf(`Downloaded kubectl version v1.7.0`) != -1, "Downloaded correct version of kubectl"); | ||
assert(tr.stdout.indexOf(`[command]${shared.formatPath("newUserDir/kubectl.exe")} --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
done(); | ||
|
@@ -84,7 +84,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`Get stable kubectl version`) != -1, "Stable version of kubectl is downloaded"); | ||
assert(tr.stdout.indexOf(`Got kubectl version v1.6.6`) != -1, "Got the latest version of kubectl"); | ||
assert(tr.stdout.indexOf(`Downloaded kubectl`) != -1, "Downloaded correct version of kubectl"); | ||
assert(tr.stdout.indexOf(`Downloaded kubectl version v1.6.6`) != -1, "Downloaded correct version of kubectl"); | ||
assert(tr.stdout.indexOf(`[command]${shared.formatPath("newUserDir/kubectl.exe")} --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
done(); | ||
|
@@ -105,7 +105,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`Get stable kubectl version`) != -1, "Stable version of kubectl is downloaded"); | ||
assert(tr.stdout.indexOf(`Got kubectl version v1.6.6`) != -1, "Got the latest version of kubectl"); | ||
assert(tr.stdout.indexOf(`Downloaded kubectl`) != -1, "Downloaded correct version of kubectl"); | ||
assert(tr.stdout.indexOf(`Downloaded kubectl version v1.6.6`) != -1, "Downloaded correct version of kubectl"); | ||
assert(tr.stdout.indexOf(`[command]${shared.formatPath("newUserDir/kubectl.exe")} --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
done(); | ||
|
@@ -203,6 +203,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.invokedToolCount == 2, 'should have invoked tool one times. actual: ' + tr.invokedToolCount); | ||
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr'); | ||
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`DeleteSecret my-secret`) != -1, "kubectl delete should run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} create secret docker-registry my-secret --docker-server=https://index.docker.io/v1/ --docker-username=test --docker-password=regpassword [email protected]`) != -1, "kubectl create should run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
|
@@ -222,6 +223,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.invokedToolCount == 2, 'should have invoked tool one times. actual: ' + tr.invokedToolCount); | ||
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr'); | ||
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`DeleteSecret my-secret`) == -1, "kubectl delete should not run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} create secret docker-registry my-secret --docker-server=https://index.docker.io/v1/ --docker-username=test --docker-password=regpassword [email protected]`) != -1, "kubectl create should run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
|
@@ -240,6 +242,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.invokedToolCount == 2, 'should have invoked tool one times. actual: ' + tr.invokedToolCount); | ||
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr'); | ||
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`DeleteSecret my-secret`) != -1, "kubectl delete should run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} create secret docker-registry my-secret --docker-server=ajgtestacr1.azurecr.io --docker-username=spId --docker-password=spKey --docker-email=ServicePrincipal@AzureRM`) != -1, "kubectl create should run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
|
@@ -259,6 +262,7 @@ describe('Kubernetes Suite', function() { | |
assert(tr.invokedToolCount == 2, 'should have invoked tool one times. actual: ' + tr.invokedToolCount); | ||
assert(tr.stderr.length == 0 || tr.errorIssues.length, 'should not have written to stderr'); | ||
assert(tr.succeeded, 'task should have succeeded'); | ||
assert(tr.stdout.indexOf(`DeleteSecret my-secret`) == -1, "kubectl delete should not run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} create secret docker-registry my-secret --docker-server=ajgtestacr1.azurecr.io --docker-username=spId --docker-password=spKey --docker-email=ServicePrincipal@AzureRM`) != -1, "kubectl create should run"); | ||
assert(tr.stdout.indexOf(`[command]kubectl --kubeconfig ${shared.formatPath("newUserDir/config")} get pods`) != -1, "kubectl get should run"); | ||
console.log(tr.stderr); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters