Skip to content

Commit

Permalink
fix(k8s): fix 500 in PoolPublicIPDisabled test (#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia-Cross authored Nov 8, 2023
1 parent 62ecc53 commit 9954056
Show file tree
Hide file tree
Showing 20 changed files with 11,584 additions and 23,124 deletions.
10 changes: 10 additions & 0 deletions scaleway/resource_k8s_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,16 @@ func resourceScalewayK8SPoolDelete(ctx context.Context, d *schema.ResourceData,
}
}

_, err = k8sAPI.WaitForPool(&k8s.WaitForPoolRequest{
PoolID: poolID,
Region: region,
}, scw.WithContext(ctx))
if err != nil {
if !is404Error(err) {
return diag.FromErr(err)
}
}

return nil
}

Expand Down
4 changes: 2 additions & 2 deletions scaleway/resource_k8s_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ func TestAccScalewayK8SCluster_PoolPublicIPDisabled(t *testing.T) {
resource "scaleway_k8s_pool" "public_ip" {
cluster_id = scaleway_k8s_cluster.public_ip.id
name = "pool"
name = "test-k8s-public-ip"
node_type = "gp1_xs"
size = 1
autoscaling = false
Expand Down Expand Up @@ -505,7 +505,7 @@ func TestAccScalewayK8SCluster_PoolPublicIPDisabled(t *testing.T) {
resource "scaleway_k8s_pool" "public_ip" {
cluster_id = scaleway_k8s_cluster.public_ip.id
name = "pool"
name = "test-k8s-public-ip"
node_type = "gp1_xs"
size = 1
autoscaling = false
Expand Down
2,158 changes: 518 additions & 1,640 deletions scaleway/testdata/data-source-k8s-cluster-basic.cassette.yaml

Large diffs are not rendered by default.

1,312 changes: 623 additions & 689 deletions scaleway/testdata/data-source-k8s-pool-basic.cassette.yaml

Large diffs are not rendered by default.

876 changes: 438 additions & 438 deletions scaleway/testdata/k8s-cluster-auto-upgrade.cassette.yaml

Large diffs are not rendered by default.

290 changes: 145 additions & 145 deletions scaleway/testdata/k8s-cluster-autoscaling.cassette.yaml

Large diffs are not rendered by default.

334 changes: 167 additions & 167 deletions scaleway/testdata/k8s-cluster-basic.cassette.yaml

Large diffs are not rendered by default.

1,446 changes: 360 additions & 1,086 deletions scaleway/testdata/k8s-cluster-multicloud.cassette.yaml

Large diffs are not rendered by default.

313 changes: 173 additions & 140 deletions scaleway/testdata/k8s-cluster-oidc.cassette.yaml

Large diffs are not rendered by default.

3,122 changes: 802 additions & 2,320 deletions scaleway/testdata/k8s-cluster-pool-basic.cassette.yaml

Large diffs are not rendered by default.

2,159 changes: 535 additions & 1,624 deletions scaleway/testdata/k8s-cluster-pool-kubelet-args.cassette.yaml

Large diffs are not rendered by default.

6,231 changes: 1,416 additions & 4,815 deletions scaleway/testdata/k8s-cluster-pool-placement-group.cassette.yaml

Large diffs are not rendered by default.

1,431 changes: 798 additions & 633 deletions scaleway/testdata/k8s-cluster-pool-private-network.cassette.yaml

Large diffs are not rendered by default.

2,597 changes: 1,480 additions & 1,117 deletions scaleway/testdata/k8s-cluster-pool-public-ip-disabled.cassette.yaml

Large diffs are not rendered by default.

1,456 changes: 530 additions & 926 deletions scaleway/testdata/k8s-cluster-pool-size.cassette.yaml

Large diffs are not rendered by default.

2,066 changes: 505 additions & 1,561 deletions scaleway/testdata/k8s-cluster-pool-upgrade-policy.cassette.yaml

Large diffs are not rendered by default.

4,340 changes: 1,147 additions & 3,193 deletions scaleway/testdata/k8s-cluster-pool-wait.cassette.yaml

Large diffs are not rendered by default.

1,690 changes: 449 additions & 1,241 deletions scaleway/testdata/k8s-cluster-pool-zone.cassette.yaml

Large diffs are not rendered by default.

431 changes: 232 additions & 199 deletions scaleway/testdata/k8s-cluster-private-network.cassette.yaml

Large diffs are not rendered by default.

2,442 changes: 1,254 additions & 1,188 deletions scaleway/testdata/k8s-cluster-type-change.cassette.yaml

Large diffs are not rendered by default.

0 comments on commit 9954056

Please sign in to comment.