Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AKS acceptance/mock tests to use kubernetes 1.27.9 #382

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions internal/resources/akscluster/resource_akscluster_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ import (
testhelper "github.com/vmware/terraform-provider-tanzu-mission-control/internal/resources/testing"
)

// Version of Kubernetes to deploy during acceptance tests.
var aksKubernetesVersion = "1.27.9"

func validateSetup(t *testing.T) {
// Check if the required environment variables are set
for _, name := range []string{"AKS_CREDENTIAL_NAME", "AKS_SUBSCRIPTION_ID"} {
Expand Down Expand Up @@ -393,7 +396,7 @@ func testAKSCluster(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFullName) st
spec {
config {
location = "eastus"
kubernetes_version = "1.26.6"
kubernetes_version = "%s"
network_config {
network_plugin = "azure"
dns_prefix = "dns-tf-test"
Expand All @@ -415,7 +418,7 @@ func testAKSCluster(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFullName) st
}
}
}
}`, fn.Name, fn.CredentialName, fn.SubscriptionID, fn.Name)
}`, fn.Name, fn.CredentialName, fn.SubscriptionID, fn.Name, aksKubernetesVersion)
}

func testAKSClusterEnableCSI(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFullName) string {
Expand All @@ -427,7 +430,7 @@ func testAKSClusterEnableCSI(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFul
spec {
config {
location = "eastus"
kubernetes_version = "1.26.6"
kubernetes_version = "%s"
network_config {
network_plugin = "azure"
dns_prefix = "dns-tf-test"
Expand All @@ -449,7 +452,7 @@ func testAKSClusterEnableCSI(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFul
}
}
}
}`, fn.Name, fn.CredentialName, fn.SubscriptionID, fn.Name)
}`, fn.Name, fn.CredentialName, fn.SubscriptionID, fn.Name, aksKubernetesVersion)
}

func testAKSClusterAddUserNodepool(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFullName) string {
Expand All @@ -461,7 +464,7 @@ func testAKSClusterAddUserNodepool(fn *aksmodel.VmwareTanzuManageV1alpha1Aksclus
spec {
config {
location = "eastus"
kubernetes_version = "1.26.6"
kubernetes_version = "%s"
network_config {
network_plugin = "azure"
dns_prefix = "dns-tf-test"
Expand Down Expand Up @@ -491,7 +494,7 @@ func testAKSClusterAddUserNodepool(fn *aksmodel.VmwareTanzuManageV1alpha1Aksclus
}
}
}
}`, fn.Name, fn.CredentialName, fn.SubscriptionID, fn.Name)
}`, fn.Name, fn.CredentialName, fn.SubscriptionID, fn.Name, aksKubernetesVersion)
}

func testAKSClusterRemoveUserNodepool(fn *aksmodel.VmwareTanzuManageV1alpha1AksclusterFullName) string {
Expand Down Expand Up @@ -520,7 +523,7 @@ func mockCluster(w ...clusterWither) *aksmodel.VmwareTanzuManageV1alpha1AksClust
IdentityConfig: &aksmodel.VmwareTanzuManageV1alpha1AksclusterManagedIdentityConfig{
Type: aksmodel.VmwareTanzuManageV1alpha1AksclusterManagedIdentityTypeSYSTEMASSIGNED.Pointer(),
},
Version: "1.26.6",
Version: aksKubernetesVersion,
},
},
Status: &aksmodel.VmwareTanzuManageV1alpha1AksclusterStatus{
Expand Down
Loading