Skip to content

Commit

Permalink
ProjectV2: do not check unknown indexes in test (#62)
Browse files Browse the repository at this point in the history
We don't know index hashes in the "all_quotas" attribute so we can't
really check their contents.
This commit simplifies and fixes TestAccResellV2ProjectAutoQuotas by
checking that "all_quotas" is set.
  • Loading branch information
ozerovandrei authored Nov 8, 2018
1 parent 714a9ec commit 5545c59
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions selvpc/resource_selvpc_resell_project_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,30 +88,7 @@ func TestAccResellV2ProjectAutoQuotas(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccCheckResellV2ProjectExists("selvpc_resell_project_v2.project_tf_acc_test_1", &project),
resource.TestCheckResourceAttr("selvpc_resell_project_v2.project_tf_acc_test_1", "name", projectName),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.0.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.0.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.0.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.1.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.1.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.1.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.2.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.2.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.2.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.3.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.3.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.3.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.4.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.4.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.4.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.5.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.5.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.5.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.6.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.6.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.6.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.7.resource_quotas.0.region"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.7.resource_quotas.0.value"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.7.resource_quotas.0.used"),
resource.TestCheckResourceAttrSet("selvpc_resell_project_v2.project_tf_acc_test_1", "all_quotas.#"),
),
},
},
Expand Down

0 comments on commit 5545c59

Please sign in to comment.