Skip to content

Commit

Permalink
fixing the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Feb 27, 2019
1 parent 7b541e7 commit e661b33
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions azurerm/resource_arm_api_management_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ func TestAccAzureRMApiManagementUser_basic(t *testing.T) {
}

func TestAccAzureRMApiManagementUser_requiresImport(t *testing.T) {
if !requireResourcesToBeImported {
t.Skip("Skipping since resources aren't required to be imported")
return
}

resourceName := "azurerm_api_management_user.test"
ri := tf.AccRandTimeInt()
location := testLocation()
Expand Down Expand Up @@ -77,7 +82,7 @@ func TestAccAzureRMApiManagementUser_update(t *testing.T) {
testCheckAzureRMApiManagementUserExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "first_name", "Acceptance"),
resource.TestCheckResourceAttr(resourceName, "last_name", "Test"),
resource.TestCheckResourceAttr(resourceName, "state", "pending"),
resource.TestCheckResourceAttr(resourceName, "state", "active"),
),
},
{
Expand All @@ -86,7 +91,7 @@ func TestAccAzureRMApiManagementUser_update(t *testing.T) {
testCheckAzureRMApiManagementUserExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "first_name", "Acceptance Updated"),
resource.TestCheckResourceAttr(resourceName, "last_name", "Test Updated"),
resource.TestCheckResourceAttr(resourceName, "state", "active"),
resource.TestCheckResourceAttr(resourceName, "state", "blocked"),
),
},
{
Expand All @@ -95,7 +100,7 @@ func TestAccAzureRMApiManagementUser_update(t *testing.T) {
testCheckAzureRMApiManagementUserExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "first_name", "Acceptance"),
resource.TestCheckResourceAttr(resourceName, "last_name", "Test"),
resource.TestCheckResourceAttr(resourceName, "state", "pending"),
resource.TestCheckResourceAttr(resourceName, "state", "active"),
),
},
},
Expand Down

0 comments on commit e661b33

Please sign in to comment.