Skip to content

Commit

Permalink
separate default version update from release channel test (#3762) (#2286
Browse files Browse the repository at this point in the history
)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jul 21, 2020
1 parent 24f778a commit 594b60d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/3762.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
16 changes: 14 additions & 2 deletions google-beta/resource_container_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,20 @@ func TestAccContainerCluster_withReleaseChannelEnabled(t *testing.T) {
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"min_master_version"},
},
},
})
}

func TestAccContainerCluster_withReleaseChannelEnabledDefaultVersion(t *testing.T) {
t.Parallel()
clusterName := fmt.Sprintf("tf-test-cluster-%s", randString(t, 10))
vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccContainerCluster_withReleaseChannelEnabledUpdateToChannelDefaultVersion(clusterName, "REGULAR"),
Config: testAccContainerCluster_withReleaseChannelEnabledDefaultVersion(clusterName, "REGULAR"),
},
{
ResourceName: "google_container_cluster.with_release_channel",
Expand Down Expand Up @@ -2245,7 +2257,7 @@ resource "google_container_cluster" "with_release_channel" {
`, clusterName, channel)
}

func testAccContainerCluster_withReleaseChannelEnabledUpdateToChannelDefaultVersion(clusterName string, channel string) string {
func testAccContainerCluster_withReleaseChannelEnabledDefaultVersion(clusterName string, channel string) string {
return fmt.Sprintf(`
data "google_container_engine_versions" "central1a" {
Expand Down

0 comments on commit 594b60d

Please sign in to comment.