未验证 提交 9fc4b2c1 编写于 作者: M Medya Ghazizadeh 提交者: GitHub

Merge pull request #9755 from medyagh/improve_svc_test

integration test: fail service test early if can't deploy example svc
......@@ -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 {
......
......@@ -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())
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册