Skip to content

Commit

Permalink
Create & Power On Hardware for Autoscaler Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmeier5 committed Oct 10, 2023
1 parent 14e7ddd commit 00a4228
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
23 changes: 20 additions & 3 deletions test/e2e/autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
4 changes: 2 additions & 2 deletions test/e2e/tinkerbell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func TestTinkerbellKubernetes128UbuntuCuratedPackagesClusterAutoscalerSimpleFlow
EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI,
EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil),
)
runAutoscalerWithMetricsServerSimpleFlow(test)
runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test)
}

func TestTinkerbellKubernetes127UbuntuSingleNodeCuratedPackagesFlow(t *testing.T) {
Expand Down Expand Up @@ -442,7 +442,7 @@ func TestTinkerbellKubernetes127UbuntuCuratedPackagesClusterAutoscalerSimpleFlow
EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI,
EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil),
)
runAutoscalerWithMetricsServerSimpleFlow(test)
runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test)
}

func TestTinkerbellKubernetes126UbuntuSingleNodeCuratedPackagesFlow(t *testing.T) {
Expand Down

0 comments on commit 00a4228

Please sign in to comment.