Skip to content

Commit fe59f09

Browse files
Add new dataproc label to test checks (#13108) (#9353)
[upstream:36e7289e0d696dd8c2a2e92e623edb8f62dd7e07] Signed-off-by: Modular Magician <[email protected]>
1 parent b51eac0 commit fe59f09

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

.changelog/13108.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```release-note:none
2+
```

google-beta/services/dataproc/resource_dataproc_cluster_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,8 @@ func TestAccDataprocCluster_withLabels(t *testing.T) {
955955
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_labels", &cluster),
956956

957957
resource.TestCheckNoResourceAttr("google_dataproc_cluster.with_labels", "labels.%"),
958-
// We don't provide any, but GCP adds three and goog-dataproc-autozone is added internally, so expect 4.
959-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "4"),
958+
// We don't provide any, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 5.
959+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
960960
),
961961
},
962962
{
@@ -966,8 +966,8 @@ func TestAccDataprocCluster_withLabels(t *testing.T) {
966966

967967
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "1"),
968968
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.key1", "value1"),
969-
// We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 5.
970-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
969+
// We only provide one, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 6.
970+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "6"),
971971
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.key1", "value1"),
972972
),
973973
},
@@ -987,8 +987,8 @@ func TestAccDataprocCluster_withLabels(t *testing.T) {
987987
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_labels", &cluster),
988988

989989
resource.TestCheckNoResourceAttr("google_dataproc_cluster.with_labels", "labels.%"),
990-
// We don't provide any, but GCP adds three and goog-dataproc-autozone is added internally, so expect 4.
991-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "4"),
990+
// We don't provide any, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 5.
991+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
992992
),
993993
},
994994
},

google-beta/services/dataproc/resource_dataproc_cluster_upgrade_test.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ func TestAccDataprocClusterLabelsMigration_withoutLabels_withoutChanges(t *testi
4646
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_labels", &cluster),
4747

4848
resource.TestCheckNoResourceAttr("google_dataproc_cluster.with_labels", "labels.%"),
49-
// GCP adds three and goog-dataproc-autozone is added internally, so expect 4.
50-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "4"),
49+
// GCP adds 4 and goog-dataproc-autozone is added internally, so expect 5.
50+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
5151
),
5252
},
5353
{
@@ -58,8 +58,8 @@ func TestAccDataprocClusterLabelsMigration_withoutLabels_withoutChanges(t *testi
5858

5959
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "1"),
6060
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.key1", "value1"),
61-
// We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 5.
62-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
61+
// We only provide one, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 6.
62+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "6"),
6363
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.key1", "value1"),
6464
),
6565
},
@@ -100,8 +100,8 @@ func TestAccDataprocClusterLabelsMigration_withLabels_withoutChanges(t *testing.
100100

101101
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "1"),
102102
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.key1", "value1"),
103-
// We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 5.
104-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
103+
// We only provide one, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 6.
104+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "6"),
105105
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.key1", "value1"),
106106
),
107107
},
@@ -114,8 +114,8 @@ func TestAccDataprocClusterLabelsMigration_withLabels_withoutChanges(t *testing.
114114
// We only provide one, so expect 1.
115115
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "1"),
116116
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.key2", "value2"),
117-
// We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 5.
118-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
117+
// We only provide one, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 6.
118+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "6"),
119119
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.key2", "value2"),
120120
),
121121
},
@@ -156,8 +156,8 @@ func TestAccDataprocClusterLabelsMigration_withUpdate(t *testing.T) {
156156

157157
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "1"),
158158
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.key1", "value1"),
159-
// We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 5.
160-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
159+
// We only provide one, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 6.
160+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "6"),
161161
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.key1", "value1"),
162162
),
163163
},
@@ -168,8 +168,8 @@ func TestAccDataprocClusterLabelsMigration_withUpdate(t *testing.T) {
168168
testAccCheckDataprocClusterExists(t, "google_dataproc_cluster.with_labels", &cluster),
169169

170170
resource.TestCheckNoResourceAttr("google_dataproc_cluster.with_labels", "labels.%"),
171-
// We only provide one, but GCP adds three and goog-dataproc-autozone is added internally, so expect 4.
172-
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "4"),
171+
// We only provide one, but GCP adds 4 and goog-dataproc-autozone is added internally, so expect 5.
172+
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "effective_labels.%", "5"),
173173
),
174174
},
175175
},

0 commit comments

Comments
 (0)