expect 4 labels in dataproc cluster test (#1182)

This commit is contained in:
Dana Hoffman 2018-03-12 09:06:05 -07:00 committed by GitHub
parent add2454a7a
commit c33b33e1cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,14 +410,14 @@ func TestAccDataprocCluster_withLabels(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckDataprocClusterExists("google_dataproc_cluster.with_labels", &cluster),
// We only provide one, but GCP adds two, so expect 3. This means unfortunately a
// We only provide one, but GCP adds three, so expect 4. This means unfortunately a
// diff will exist unless the user adds these in. An alternative approach would
// be to follow the same approach as properties, i.e. split in into labels
// and override_labels
//
// The config is currently configured with ignore_changes = ["labels"] to handle this
//
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "3"),
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.%", "4"),
resource.TestCheckResourceAttr("google_dataproc_cluster.with_labels", "labels.key1", "value1"),
),
},