Skip to content

Commit

Permalink
Fix test: TestAccContainer*_withInvalid* (hashicorp#10277)
Browse files Browse the repository at this point in the history
* fix test TestAccContainerCluster_withInvalidAutoscalingProfile

* fix test TestAccContainer*_withInvalid*

[upstream:8410d877228030e7c97045bfe491c19c8b941a2b]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Mar 25, 2024
1 parent ba4dd7c commit 97a8295
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/10277.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
4 changes: 2 additions & 2 deletions google/services/container/resource_container_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ func TestAccContainerCluster_withInvalidReleaseChannel(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccContainerCluster_withReleaseChannelEnabled(clusterName, "CANARY", networkName, subnetworkName),
ExpectError: regexp.MustCompile(`expected release_channel\.0\.channel to be one of \[UNSPECIFIED RAPID REGULAR STABLE\], got CANARY`),
ExpectError: regexp.MustCompile(`expected release_channel\.0\.channel to be one of \["?UNSPECIFIED"? "?RAPID"? "?REGULAR"? "?STABLE"?\], got CANARY`),
},
},
})
Expand Down Expand Up @@ -2975,7 +2975,7 @@ func TestAccContainerCluster_withInvalidAutoscalingProfile(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccContainerCluster_withAutoscalingProfile(clusterName, "AS_CHEAP_AS_POSSIBLE", networkName, subnetworkName),
ExpectError: regexp.MustCompile(`expected cluster_autoscaling\.0\.autoscaling_profile to be one of \[BALANCED OPTIMIZE_UTILIZATION\], got AS_CHEAP_AS_POSSIBLE`),
ExpectError: regexp.MustCompile(`expected cluster_autoscaling\.0\.autoscaling_profile to be one of \["?BALANCED"? "?OPTIMIZE_UTILIZATION"?\], got AS_CHEAP_AS_POSSIBLE`),
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ func TestAccContainerNodePool_withInvalidKubeletCpuManagerPolicy(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "dontexist", "100us", networkName, subnetworkName, true, 1024),
ExpectError: regexp.MustCompile(`.*to be one of \[static none \].*`),
ExpectError: regexp.MustCompile(`.*to be one of \["?static"? "?none"? "?"?\].*`),
},
},
})
Expand Down

0 comments on commit 97a8295

Please sign in to comment.