Skip to content

Commit c7d4c41

Browse files
authored
fix(k8s): remove step on ClusterTypeChange to avoid out of stock (#2345)
* fix(k8s): move ClusterTypeChange test to nl-ams to avoid out of stock * fix(k8s): remove ClusterTypeChange test step with biggest type
1 parent d564d6f commit c7d4c41

File tree

2 files changed

+2440
-1846
lines changed

2 files changed

+2440
-1846
lines changed

scaleway/resource_k8s_cluster_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -500,24 +500,15 @@ func TestAccScalewayK8SCluster_TypeChange(t *testing.T) {
500500
},
501501
{
502502
// 3 : Upgrade to an even bigger dedicated Kapsule --> should migrate
503-
Config: testAccCheckScalewayK8SClusterTypeChange("kapsule-dedicated-16", "cilium", latestK8SVersion),
504-
Check: resource.ComposeTestCheckFunc(
505-
testAccCheckScalewayK8SClusterExists(tt, "scaleway_k8s_cluster.type-change"),
506-
resource.TestCheckResourceAttr("scaleway_k8s_cluster.type-change", "type", "kapsule-dedicated-16"),
507-
testAccCheckScalewayResourceIDPersisted("scaleway_k8s_cluster.type-change", &clusterID),
508-
),
509-
},
510-
{
511-
// 4 : Downgrade to a smaller dedicated Kapsule --> should recreate
512503
Config: testAccCheckScalewayK8SClusterTypeChange("kapsule-dedicated-8", "cilium", latestK8SVersion),
513504
Check: resource.ComposeTestCheckFunc(
514505
testAccCheckScalewayK8SClusterExists(tt, "scaleway_k8s_cluster.type-change"),
515506
resource.TestCheckResourceAttr("scaleway_k8s_cluster.type-change", "type", "kapsule-dedicated-8"),
516-
testAccCheckScalewayResourceIDChanged("scaleway_k8s_cluster.type-change", &clusterID),
507+
testAccCheckScalewayResourceIDPersisted("scaleway_k8s_cluster.type-change", &clusterID),
517508
),
518509
},
519510
{
520-
// 5 : Change to a dedicated Kosmos --> should recreate
511+
// 4 : Change to a dedicated Kosmos --> should recreate
521512
Config: testAccCheckScalewayK8SClusterTypeChange("multicloud-dedicated-4", "kilo", latestK8SVersion),
522513
Check: resource.ComposeTestCheckFunc(
523514
testAccCheckScalewayK8SClusterExists(tt, "scaleway_k8s_cluster.type-change"),
@@ -526,14 +517,23 @@ func TestAccScalewayK8SCluster_TypeChange(t *testing.T) {
526517
),
527518
},
528519
{
529-
// 6 : Upgrade to a bigger dedicated Kosmos --> should migrate
520+
// 5 : Upgrade to a bigger dedicated Kosmos --> should migrate
530521
Config: testAccCheckScalewayK8SClusterTypeChange("multicloud-dedicated-8", "kilo", latestK8SVersion),
531522
Check: resource.ComposeTestCheckFunc(
532523
testAccCheckScalewayK8SClusterExists(tt, "scaleway_k8s_cluster.type-change"),
533524
resource.TestCheckResourceAttr("scaleway_k8s_cluster.type-change", "type", "multicloud-dedicated-8"),
534525
testAccCheckScalewayResourceIDPersisted("scaleway_k8s_cluster.type-change", &clusterID),
535526
),
536527
},
528+
{
529+
// 6 : Downgrade to a smaller dedicated Kosmos --> should recreate
530+
Config: testAccCheckScalewayK8SClusterTypeChange("multicloud-dedicated-4", "kilo", latestK8SVersion),
531+
Check: resource.ComposeTestCheckFunc(
532+
testAccCheckScalewayK8SClusterExists(tt, "scaleway_k8s_cluster.type-change"),
533+
resource.TestCheckResourceAttr("scaleway_k8s_cluster.type-change", "type", "multicloud-dedicated-4"),
534+
testAccCheckScalewayResourceIDChanged("scaleway_k8s_cluster.type-change", &clusterID),
535+
),
536+
},
537537
{
538538
// 7 : Downgrade to a mutualized Kosmos --> should recreate
539539
Config: testAccCheckScalewayK8SClusterTypeChange("multicloud", "kilo", latestK8SVersion),

0 commit comments

Comments
 (0)