Skip to content

Commit

Permalink
update resource name and add to oauth test config
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoodsell-tempus committed Sep 12, 2023
1 parent fdd6f1a commit b9c4e95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/okta_app_oauth/service_with_jwks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ resource "okta_app_oauth" "test" {
}
}

resource "okta_app_oauth" "test2" {
label = "test2Acc_replace_with_uuid"
resource "okta_app_oauth" "test_ec" {
label = "test_ecAcc_replace_with_uuid"
type = "service"
response_types = ["token"]
grant_types = ["client_credentials"]
Expand Down
14 changes: 13 additions & 1 deletion okta/resource_okta_app_oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ func TestAccResourceOktaAppOauth_serviceWithJWKS(t *testing.T) {
config := mgr.GetFixtures("service_with_jwks.tf", t)
resourceName := fmt.Sprintf("%s.test", appOAuth)

ecResourceName := fmt.Sprintf("%s.test2", appOAuth)

oktaResourceTest(t, resource.TestCase{
PreCheck: testAccPreCheck(t),
ErrorCheck: testAccErrorChecks(t),
Expand All @@ -282,6 +284,16 @@ func TestAccResourceOktaAppOauth_serviceWithJWKS(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "jwks.0.n", "owfoXNHcAlAVpIO41840ZU2tZraLGw3yEr3xZvAti7oEZPUKCytk88IDgH7440JOuz8GC_D6vtduWOqnEt0j0_faJnhKHgfj7DTWBOCxzSdjrM-Uyj6-e_XLFvZXzYsQvt52PnBJUV15G1W9QTjlghT_pFrW0xrTtbO1c281u1HJdPd5BeIyPb0pGbciySlx53OqGyxrAxPAt5P5h-n36HJkVsSQtNvgptLyOwWYkX50lgnh2szbJ0_O581bqkNBy9uqlnVeK1RZDQUl4mk8roWYhsx_JOgjpC3YyeXA6hHsT5xWZos_gNx98AHivNaAjzIzvyVItX2-hP0Aoscfff"),
),
},
{
Config: config,
Check: resource.ComposeTestCheckFunc(
ensureResourceExists(ecResourceName, createDoesAppExist(sdk.NewOpenIdConnectApplication())),
resource.TestCheckResourceAttr(ecResourceName, "jwks.0.kty", "EC"),
resource.TestCheckResourceAttr(ecResourceName, "jwks.0.kid", "testing"),
resource.TestCheckResourceAttr(ecResourceName, "jwks.0.x", "K37X78mXJHHldZYMzrwipjKR-YZUS2SMye0KindHp6I"),
resource.TestCheckResourceAttr(ecResourceName, "jwks.0.y", "8IfvsvXWzbFWOZoVOMwgF5p46mUj3kbOVf9Fk0vVVHo"),
),
},
},
})
}
Expand Down Expand Up @@ -352,7 +364,7 @@ func TestAccResourceOktaAppOauth_redirect_uris(t *testing.T) {
"https://*.example.com/"
]
response_types = ["code"]
}
}
`,
Check: resource.ComposeTestCheckFunc(
ensureResourceExists(resourceName, createDoesAppExist(sdk.NewOpenIdConnectApplication())),
Expand Down

0 comments on commit b9c4e95

Please sign in to comment.