Skip to content

Commit

Permalink
Merge pull request #9755 from medyagh/improve_svc_test
Browse files Browse the repository at this point in the history
integration test: fail service test early if can't deploy example svc
  • Loading branch information
medyagh authored Nov 21, 2020
2 parents 61abd1e + 5d34a5e commit 9fc4b2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/integration/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -756,11 +756,11 @@ func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {

rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image=k8s.gcr.io/echoserver:1.4"))
if err != nil {
t.Logf("%q failed: %v (may not be an error).", rr.Command(), err)
t.Fatalf("failed to create hello-node deployment with this command %q: %v.", rr.Command(), err)
}
rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "expose", "deployment", "hello-node", "--type=NodePort", "--port=8080"))
if err != nil {
t.Logf("%q failed: %v (may not be an error)", rr.Command(), err)
t.Fatalf("failed to expose hello-node deployment: %q : %v", rr.Command(), err)
}

if _, err := PodWait(ctx, t, profile, "default", "app=hello-node", Minutes(10)); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/scheduled_stop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestScheduledStopUnix(t *testing.T) {
}

func startMinikube(ctx context.Context, t *testing.T, profile string) {
args := append([]string{"start", "-p", profile}, StartArgs()...)
args := append([]string{"start", "-p", profile, "--memory=1900"}, StartArgs()...)
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil {
t.Fatalf("starting minikube: %v\n%s", err, rr.Output())
Expand Down
2 changes: 1 addition & 1 deletion test/integration/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestInsufficientStorage(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), Minutes(5))
defer Cleanup(t, profile, cancel)

startArgs := []string{"start", "-p", profile, "--output=json", "--wait=true"}
startArgs := []string{"start", "-p", profile, "--memory=1900", "--output=json", "--wait=true"}
startArgs = append(startArgs, StartArgs()...)
c := exec.CommandContext(ctx, Target(), startArgs...)
// artificially set /var to 100% capacity
Expand Down

0 comments on commit 9fc4b2c

Please sign in to comment.