Skip to content

Commit

Permalink
Add tinkerbell specific framework flow for autoscaler e2e tests (#6977)
Browse files Browse the repository at this point in the history
* Add tinkerbell specific framework flow for autoscaler e2e tests

Signed-off-by: Rahul Ganesh <[email protected]>

* Fix helper function logic

Signed-off-by: Rahul Ganesh <[email protected]>

---------

Signed-off-by: Rahul Ganesh <[email protected]>
Co-authored-by: Rahul Ganesh <[email protected]>
  • Loading branch information
rahulbabu95 and Rahul Ganesh authored Nov 7, 2023
1 parent 03b4275 commit 65f036d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions test/e2e/autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,18 @@ func runAutoscalerWithMetricsServerSimpleFlow(test *framework.ClusterE2ETest) {
test.CombinedAutoScalerMetricServerTest(autoscalerName, metricServerName, targetNamespace, withMgmtCluster(test))
})
}

func runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test *framework.ClusterE2ETest) {
test.GenerateClusterConfig()
test.GenerateHardwareConfig()
test.PowerOnHardware()
test.CreateCluster(framework.WithControlPlaneWaitTimeout("20m"))
autoscalerName := "cluster-autoscaler"
metricServerName := "metrics-server"
targetNamespace := "eksa-packages"
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 @@ -489,7 +489,7 @@ func TestTinkerbellKubernetes127UbuntuCuratedPackagesClusterAutoscalerSimpleFlow
EksaPackageControllerHelmChartName, EksaPackageControllerHelmURI,
EksaPackageControllerHelmVersion, EksaPackageControllerHelmValues, nil),
)
runAutoscalerWithMetricsServerSimpleFlow(test)
runAutoscalerWithMetricsServerTinkerbellSimpleFlow(test)
}

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

// Single node
Expand Down

0 comments on commit 65f036d

Please sign in to comment.