From 88f327710cefb5e3a0f37ffb9a2db8ef3cb89962 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Wed, 28 Feb 2024 15:46:47 -0800 Subject: [PATCH] testing: Update oldest supported K8s version to v1.20 --- pkg/minikube/constants/constants.go | 2 +- test/integration/ingress_addon_legacy_test.go | 82 ------------------- 2 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 test/integration/ingress_addon_legacy_test.go diff --git a/pkg/minikube/constants/constants.go b/pkg/minikube/constants/constants.go index 7852cc028c35..404a2359f4f2 100644 --- a/pkg/minikube/constants/constants.go +++ b/pkg/minikube/constants/constants.go @@ -39,7 +39,7 @@ const ( // NOTE: You may need to update coreDNS & etcd versions in pkg/minikube/bootstrapper/images/images.go NewestKubernetesVersion = "v1.29.0-rc.2" // OldestKubernetesVersion is the oldest Kubernetes version to test against - OldestKubernetesVersion = "v1.16.0" + OldestKubernetesVersion = "v1.20.0" // NoKubernetesVersion is the version used when users does NOT want to install kubernetes NoKubernetesVersion = "v0.0.0" diff --git a/test/integration/ingress_addon_legacy_test.go b/test/integration/ingress_addon_legacy_test.go deleted file mode 100644 index 3bbc847bb9b0..000000000000 --- a/test/integration/ingress_addon_legacy_test.go +++ /dev/null @@ -1,82 +0,0 @@ -//go:build integration - -/* -Copyright 2021 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package integration - -import ( - "context" - "os/exec" - "testing" -) - -// TestIngressAddonLegacy tests ingress and ingress-dns addons with legacy k8s version <1.19 -func TestIngressAddonLegacy(t *testing.T) { - if NoneDriver() { - t.Skipf("skipping: none driver does not support ingress") - } - - profile := UniqueProfileName("ingress-addon-legacy") - ctx, cancel := context.WithTimeout(context.Background(), Minutes(10)) - defer Cleanup(t, profile, cancel) - - t.Run("StartLegacyK8sCluster", func(t *testing.T) { - args := append([]string{"start", "-p", profile, "--kubernetes-version=v1.18.20", "--memory=4096", "--wait=true", "--alsologtostderr", "-v=5"}, StartArgs()...) - rr, err := Run(t, exec.CommandContext(ctx, Target(), args...)) - if err != nil { - t.Errorf("failed to start minikube with args: %q : %v", rr.Command(), err) - } - }) - - t.Run("serial", func(t *testing.T) { - tests := []struct { - name string - validator validateFunc - }{ - {"ValidateIngressAddonActivation", validateIngressAddonActivation}, - {"ValidateIngressDNSAddonActivation", validateIngressDNSAddonActivation}, - {"ValidateIngressAddons", validateIngressAddon}, - } - for _, tc := range tests { - tc := tc - if ctx.Err() == context.DeadlineExceeded { - t.Fatalf("Unable to run more tests (deadline exceeded)") - } - t.Run(tc.name, func(t *testing.T) { - tc.validator(ctx, t, profile) - }) - } - }) -} - -// validateIngressAddonActivation tests ingress addon activation -func validateIngressAddonActivation(ctx context.Context, t *testing.T, profile string) { - defer PostMortemLogs(t, profile) - - if _, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "addons", "enable", "ingress", "--alsologtostderr", "-v=5")); err != nil { - t.Errorf("failed to enable ingress addon: %v", err) - } -} - -// validateIngressDNSAddonActivation tests ingress-dns addon activation -func validateIngressDNSAddonActivation(ctx context.Context, t *testing.T, profile string) { - defer PostMortemLogs(t, profile) - - if _, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "addons", "enable", "ingress-dns", "--alsologtostderr", "-v=5")); err != nil { - t.Errorf("failed to enable ingress-dns addon: %v", err) - } -}