Skip to content

Commit

Permalink
add e2e test for iam in workload only
Browse files Browse the repository at this point in the history
  • Loading branch information
tatlat committed Dec 7, 2024
1 parent a209eaa commit 17d3db2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/e2e/awsiamauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package e2e

import (
"time"

"github.com/aws/eks-anywhere/pkg/api/v1alpha1"
"github.com/aws/eks-anywhere/test/framework"
)
Expand Down Expand Up @@ -36,3 +38,16 @@ func runTinkerbellAWSIamAuthFlow(test *framework.ClusterE2ETest) {
test.DeleteCluster()
test.ValidateHardwareDecommissioned()
}

func runAWSIamAuthFlowWorkload(test *framework.MulticlusterE2ETest) {
test.CreateManagementClusterWithConfig()
test.RunInWorkloadClusters(func(w *framework.WorkloadCluster) {
w.GenerateClusterConfig()
w.CreateCluster()
w.ValidateAWSIamAuth()
w.StopIfFailed()
w.DeleteCluster()
})
time.Sleep(5 * time.Minute)
test.DeleteManagementCluster()
}
29 changes: 29 additions & 0 deletions test/e2e/vsphere_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,35 @@ func TestVSphereKubernetes131AWSIamAuth(t *testing.T) {
runAWSIamAuthFlow(test)
}

func TestVSphereKubernetes130AWSIamAuthWorkloadCluster(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu130())
test := framework.NewMulticlusterE2ETest(
t,
framework.NewClusterE2ETest(
t,
provider,
framework.WithClusterFiller(
api.WithKubernetesVersion(v1alpha1.Kube130),
api.WithControlPlaneCount(1),
api.WithWorkerNodeCount(1),
api.WithStackedEtcdTopology(),
),
),
framework.NewClusterE2ETest(
t,
provider,
framework.WithAWSIam(),
framework.WithClusterFiller(
api.WithKubernetesVersion(v1alpha1.Kube130),
api.WithControlPlaneCount(1),
api.WithWorkerNodeCount(1),
api.WithStackedEtcdTopology(),
),
),
)
runAWSIamAuthFlowWorkload(test)
}

func TestVSphereKubernetes127BottleRocketAWSIamAuth(t *testing.T) {
test := framework.NewClusterE2ETest(
t,
Expand Down

0 comments on commit 17d3db2

Please sign in to comment.