diff --git a/test/e2e/autoscaler.go b/test/e2e/autoscaler.go index a230b7a5c044..65789db1c412 100644 --- a/test/e2e/autoscaler.go +++ b/test/e2e/autoscaler.go @@ -7,12 +7,29 @@ import ( "github.com/aws/eks-anywhere/test/framework" ) +const ( + autoscalerName = "cluster-autoscaler" + metricServerName = "metrics-server" + targetNamespace = "eksa-packages" +) + func runAutoscalerWithMetricsServerSimpleFlow(test *framework.ClusterE2ETest) { test.WithCluster(func(e *framework.ClusterE2ETest) { - autoscalerName := "cluster-autoscaler" - metricServerName := "metrics-server" - targetNamespace := "eksa-packages" test.InstallAutoScalerWithMetricServer(targetNamespace) test.CombinedAutoScalerMetricServerTest(autoscalerName, metricServerName, targetNamespace, withMgmtCluster(test)) }) } + +func runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test *framework.ClusterE2ETest) { + test.GenerateHardwareConfig() + test.PowerOffHardware() + test.GenerateClusterConfig() + test.PowerOnHardware() + test.CreateCluster(framework.WithControlPlaneWaitTimeout("20m")) + test.ValidateControlPlaneNodes(framework.ValidateControlPlaneNoTaints, framework.ValidateControlPlaneLabels) + test.InstallAutoScalerWithMetricServer(targetNamespace) + test.CombinedAutoScalerMetricServerTest(autoscalerName, metricServerName, targetNamespace, withMgmtCluster(test)) + test.DeleteCluster() + test.PowerOffHardware() + test.ValidateHardwareDecommissioned() +} diff --git a/test/e2e/tinkerbell_test.go b/test/e2e/tinkerbell_test.go index 8dfc0b79d3c4..637885366077 100644 --- a/test/e2e/tinkerbell_test.go +++ b/test/e2e/tinkerbell_test.go @@ -302,7 +302,7 @@ func TestTinkerbellKubernetes128UbuntuCuratedPackagesClusterAutoscalerSimpleFlow EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), ) - runAutoscalerWithMetricsServerSimpleFlow(test) + runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test) } func TestTinkerbellKubernetes127UbuntuSingleNodeCuratedPackagesFlow(t *testing.T) { @@ -442,7 +442,7 @@ func TestTinkerbellKubernetes127UbuntuCuratedPackagesClusterAutoscalerSimpleFlow EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI, EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil), ) - runAutoscalerWithMetricsServerSimpleFlow(test) + runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test) } func TestTinkerbellKubernetes126UbuntuSingleNodeCuratedPackagesFlow(t *testing.T) {