Skip to content

Commit c63e316

Browse files
committedApr 29, 2020
Add memory limits to remaining integration test clusters
1 parent 135a32f commit c63e316

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎test/integration/docker_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func TestForceSystemd(t *testing.T) {
7575
defer CleanupWithLogs(t, profile, cancel)
7676

7777
// Use the most verbose logging for the simplest test. If it fails, something is very wrong.
78-
args := append([]string{"start", "-p", profile, "--force-systemd", "--alsologtostderr", "-v=5"}, StartArgs()...)
78+
args := append([]string{"start", "-p", "--memory=1800", profile, "--force-systemd", "--alsologtostderr", "-v=5"}, StartArgs()...)
7979
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
8080
if err != nil {
8181
t.Errorf("failed to start minikube with args: %q : %v", rr.Command(), err)

‎test/integration/functional_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func validateStartWithProxy(ctx context.Context, t *testing.T, profile string) {
195195

196196
// Use more memory so that we may reliably fit MySQL and nginx
197197
// changing api server so later in soft start we verify it didn't change
198-
startArgs := append([]string{"start", "-p", profile, fmt.Sprintf("--apiserver-port=%d", apiPortTest), "--wait=true"}, StartArgs()...)
198+
startArgs := append([]string{"start", "-p", profile, "--memory=2800", fmt.Sprintf("--apiserver-port=%d", apiPortTest), "--wait=true"}, StartArgs()...)
199199
c := exec.CommandContext(ctx, Target(), startArgs...)
200200
env := os.Environ()
201201
env = append(env, fmt.Sprintf("HTTP_PROXY=%s", srv.Addr))

‎test/integration/multinode_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func TestMultiNode(t *testing.T) {
5757

5858
func validateMultiNodeStart(ctx context.Context, t *testing.T, profile string) {
5959
// Start a 2 node cluster with the --nodes param
60-
startArgs := append([]string{"start", "-p", profile, "--wait=true", "--nodes=2"}, StartArgs()...)
60+
startArgs := append([]string{"start", "-p", profile, "--wait=true", "--memory=2200", "--nodes=2"}, StartArgs()...)
6161
rr, err := Run(t, exec.CommandContext(ctx, Target(), startArgs...))
6262
if err != nil {
6363
t.Fatalf("failed to start cluster. args %q : %v", rr.Command(), err)

‎test/integration/version_upgrade_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func TestVersionUpgrade(t *testing.T) {
9595
t.Errorf("FAILED: status = %q; want = %q", got, state.Stopped.String())
9696
}
9797

98-
args = append([]string{"start", "-p", profile, fmt.Sprintf("--kubernetes-version=%s", constants.NewestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
98+
args = append([]string{"start", "-p", profile, "--memory=2200", fmt.Sprintf("--kubernetes-version=%s", constants.NewestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
9999
rr, err = Run(t, exec.CommandContext(ctx, Target(), args...))
100100
if err != nil {
101101
t.Errorf("failed to start minikube HEAD with newest k8s version. args: %s : %v", rr.Command(), err)
@@ -121,13 +121,13 @@ func TestVersionUpgrade(t *testing.T) {
121121
}
122122

123123
t.Logf("Attempting to downgrade Kubernetes (should fail)")
124-
args = append([]string{"start", "-p", profile, fmt.Sprintf("--kubernetes-version=%s", constants.OldestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
124+
args = append([]string{"start", "-p", profile, "--memory=2200", fmt.Sprintf("--kubernetes-version=%s", constants.OldestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
125125
if rr, err := Run(t, exec.CommandContext(ctx, tf.Name(), args...)); err == nil {
126126
t.Fatalf("downgrading kubernetes should not be allowed. expected to see error but got %v for %q", err, rr.Command())
127127
}
128128

129129
t.Logf("Attempting restart after unsuccessful downgrade")
130-
args = append([]string{"start", "-p", profile, fmt.Sprintf("--kubernetes-version=%s", constants.NewestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
130+
args = append([]string{"start", "-p", profile, "--memory=2200", fmt.Sprintf("--kubernetes-version=%s", constants.NewestKubernetesVersion), "--alsologtostderr", "-v=1"}, StartArgs()...)
131131
rr, err = Run(t, exec.CommandContext(ctx, Target(), args...))
132132
if err != nil {
133133
t.Errorf("start after failed upgrade: %v", err)

0 commit comments

Comments
 (0)
Please sign in to comment.