Skip to content

Commit

Permalink
Change region for MKS tests (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolsean authored Mar 22, 2024
1 parent 16fa2b3 commit 4cfcc72
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions selectel/resource_selectel_mks_cluster_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestAccMKSClusterV1Basic(t *testing.T) {
testAccCheckMKSClusterV1Exists("selectel_mks_cluster_v1.cluster_tf_acc_test_1", &mksCluster),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "name", clusterName),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "kube_version", kubeVersion),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-3"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-9"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_autorepair", "true"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_patch_version_auto_upgrade", "true"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "maintenance_window_start", maintenanceWindowStart),
Expand All @@ -63,7 +63,7 @@ func TestAccMKSClusterV1Basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "name", clusterName),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "kube_version", kubeVersion),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-3"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-9"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_autorepair", "false"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_patch_version_auto_upgrade", "false"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_pod_security_policy", "false"),
Expand Down Expand Up @@ -100,7 +100,7 @@ func TestAccMKSClusterV1Zonal(t *testing.T) {
testAccCheckMKSClusterV1Exists("selectel_mks_cluster_v1.cluster_tf_acc_test_1", &mksCluster),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "name", clusterName),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "kube_version", kubeVersion),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-3"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-9"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_autorepair", "true"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_patch_version_auto_upgrade", "false"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "zonal", "true"),
Expand Down Expand Up @@ -136,7 +136,7 @@ func TestAccMKSClusterV1PrivateKubeAPI(t *testing.T) {
testAccCheckMKSClusterV1Exists("selectel_mks_cluster_v1.cluster_tf_acc_test_1", &mksCluster),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "name", clusterName),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "kube_version", kubeVersion),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-3"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "region", "ru-9"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_autorepair", "true"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "enable_patch_version_auto_upgrade", "false"),
resource.TestCheckResourceAttr("selectel_mks_cluster_v1.cluster_tf_acc_test_1", "zonal", "false"),
Expand Down Expand Up @@ -247,7 +247,7 @@ resource "selectel_mks_cluster_v1" "cluster_tf_acc_test_1" {
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
}`, projectName, clusterName, kubeVersion, maintenanceWindowStart)
}
Expand All @@ -264,7 +264,7 @@ resource "selectel_mks_cluster_v1" "cluster_tf_acc_test_1" {
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
feature_gates = [%s]
admission_controllers = [%s]
Expand All @@ -283,7 +283,7 @@ resource "selectel_mks_cluster_v1" "cluster_tf_acc_test_1" {
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
enable_autorepair = false
enable_patch_version_auto_upgrade = false
Expand All @@ -302,7 +302,7 @@ func testAccMKSClusterV1Zonal(projectName, clusterName, kubeVersion, maintenance
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
enable_patch_version_auto_upgrade = false
zonal = true
Expand All @@ -318,7 +318,7 @@ func testAccMKSClusterV1PrivateKubeAPI(projectName, clusterName, kubeVersion, ma
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
enable_patch_version_auto_upgrade = false
zonal = false
Expand Down
20 changes: 10 additions & 10 deletions selectel/resource_selectel_mks_nodegroup_v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ func TestAccMKSNodegroupV1Basic(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckVPCV2ProjectExists("selectel_vpc_project_v2.project_tf_acc_test_1", &project),
testAccCheckMKSNodegroupV1Exists("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", &mksNodegroup),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "availability_zone", "ru-3a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "availability_zone", "ru-9a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "nodes_count", "2"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "nodes.#", "2"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "cpus", "1"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "ram_mb", "1024"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "volume_gb", "10"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "volume_type", "fast.ru-3a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "volume_type", "fast.ru-9a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "enable_autoscale", "true"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "autoscale_min_nodes", "2"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "autoscale_max_nodes", "3"),
Expand All @@ -65,13 +65,13 @@ func TestAccMKSNodegroupV1Basic(t *testing.T) {
{
Config: testAccMKSNodegroupV1Update(projectName, clusterName, kubeVersion, maintenanceWindowStart),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "availability_zone", "ru-3a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "availability_zone", "ru-9a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "nodes_count", "3"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "nodes.#", "3"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "cpus", "1"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "ram_mb", "1024"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "volume_gb", "10"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "volume_type", "fast.ru-3a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "volume_type", "fast.ru-9a"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "enable_autoscale", "false"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "autoscale_min_nodes", "1"),
resource.TestCheckResourceAttr("selectel_mks_nodegroup_v1.nodegroup_tf_acc_test_1", "autoscale_max_nodes", "4"),
Expand Down Expand Up @@ -142,20 +142,20 @@ resource "selectel_mks_cluster_v1" "cluster_tf_acc_test_1" {
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
}
resource "selectel_mks_nodegroup_v1" "nodegroup_tf_acc_test_1" {
cluster_id = "${selectel_mks_cluster_v1.cluster_tf_acc_test_1.id}"
project_id = "${selectel_mks_cluster_v1.cluster_tf_acc_test_1.project_id}"
region = "${selectel_mks_cluster_v1.cluster_tf_acc_test_1.region}"
availability_zone = "ru-3a"
availability_zone = "ru-9a"
nodes_count = 2
cpus = 1
ram_mb = 1024
volume_gb = 10
volume_type = "fast.ru-3a"
volume_type = "fast.ru-9a"
enable_autoscale = true
autoscale_min_nodes = 2
autoscale_max_nodes = 3
Expand Down Expand Up @@ -193,20 +193,20 @@ resource "selectel_mks_cluster_v1" "cluster_tf_acc_test_1" {
name = "%s"
kube_version = "%s"
project_id = "${selectel_vpc_project_v2.project_tf_acc_test_1.id}"
region = "ru-3"
region = "ru-9"
maintenance_window_start = "%s"
}
resource "selectel_mks_nodegroup_v1" "nodegroup_tf_acc_test_1" {
cluster_id = "${selectel_mks_cluster_v1.cluster_tf_acc_test_1.id}"
project_id = "${selectel_mks_cluster_v1.cluster_tf_acc_test_1.project_id}"
region = "${selectel_mks_cluster_v1.cluster_tf_acc_test_1.region}"
availability_zone = "ru-3a"
availability_zone = "ru-9a"
nodes_count = 3
cpus = 1
ram_mb = 1024
volume_gb = 10
volume_type = "fast.ru-3a"
volume_type = "fast.ru-9a"
enable_autoscale = false
autoscale_min_nodes = 1
autoscale_max_nodes = 4
Expand Down

0 comments on commit 4cfcc72

Please sign in to comment.