Skip to content

Commit

Permalink
consolidate test
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoodsell-tempus committed Sep 22, 2023
1 parent 057985d commit 17893bf
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions okta/resource_okta_app_oauth_role_assignment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func TestAccResourceOktaAppOAuthRoleAssignment_basic(t *testing.T) {
resource.TestCheckResourceAttrSet("okta_app_oauth_role_assignment.test", "label"),
),
},
{
ResourceName: "okta_app_oauth_role_assignment.test",
ImportState: true,
ImportStateVerify: true,
},
{
Config: mgr.GetFixtures("basic_updated.tf", t),
Check: resource.ComposeTestCheckFunc(
Expand Down Expand Up @@ -73,30 +78,3 @@ func TestAccResourceOktaAppOAuthRoleAssignment_custom(t *testing.T) {
},
})
}

func TestAccResourceOktaAppOAuthRoleAssignment_import(t *testing.T) {
mgr := newFixtureManager("okta_app_oauth_role_assignment", t.Name())

oktaResourceTest(t, resource.TestCase{
PreCheck: testAccPreCheck(t),
ErrorCheck: testAccErrorChecks(t),
ProtoV5ProviderFactories: testAccMergeProvidersFactories,
Steps: []resource.TestStep{
{
Config: mgr.GetFixtures("basic.tf", t),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("okta_app_oauth_role_assignment.test", "type", "HELP_DESK_ADMIN"),
resource.TestCheckResourceAttr("okta_app_oauth_role_assignment.test", "status", "ACTIVE"),
resource.TestCheckResourceAttrSet("okta_app_oauth_role_assignment.test", "id"),
resource.TestCheckResourceAttrSet("okta_app_oauth_role_assignment.test", "client_id"),
resource.TestCheckResourceAttrSet("okta_app_oauth_role_assignment.test", "label"),
),
},
{
ResourceName: "okta_app_oauth_role_assignment.test",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

0 comments on commit 17893bf

Please sign in to comment.