Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct updating an app when status is involved with the update #1806

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

monde
Copy link
Collaborator

@monde monde commented Nov 9, 2023

Implement consistent update behavior for all apps. Includes ACC tests and updated docs.

During an apply if there is change in status the app will first be
activated or deactivated in accordance with the status change. Then, all
other arguments that changed will be applied.

Affected resources

  • okta_app_auto_login
  • okta_app_basic_auth
  • okta_app_bookmark
  • okta_app_oauth
  • okta_app_saml
  • okta_app_secure_password_store
  • okta_app_shared_credentials
  • okta_app_swa
  • okta_app_three_field

OIE Org

$ TF_ACC=1 go test -tags unit -mod=readonly -test.v -run ^TestAppUpdateStatus_all_apps$ ./okta 2>&1
=== RUN   TestAppUpdateStatus_all_apps
=== RUN   TestAppUpdateStatus_all_apps/update_auto_login_app
=== RUN   TestAppUpdateStatus_all_apps/update_basic_auth_app
=== RUN   TestAppUpdateStatus_all_apps/update_bookmark_app
=== RUN   TestAppUpdateStatus_all_apps/update_oauth_app
=== RUN   TestAppUpdateStatus_all_apps/update_saml_app
=== RUN   TestAppUpdateStatus_all_apps/update_secure_password_store_app
=== RUN   TestAppUpdateStatus_all_apps/update_shared_credentials_app
=== RUN   TestAppUpdateStatus_all_apps/update_SWA_app
=== RUN   TestAppUpdateStatus_all_apps/update_three_field_app
--- PASS: TestAppUpdateStatus_all_apps (222.23s)
    --- PASS: TestAppUpdateStatus_all_apps/update_auto_login_app (23.75s)
    --- PASS: TestAppUpdateStatus_all_apps/update_basic_auth_app (22.83s)
    --- PASS: TestAppUpdateStatus_all_apps/update_bookmark_app (25.37s)
    --- PASS: TestAppUpdateStatus_all_apps/update_oauth_app (27.71s)
    --- PASS: TestAppUpdateStatus_all_apps/update_saml_app (31.13s)
    --- PASS: TestAppUpdateStatus_all_apps/update_secure_password_store_app (23.02s)
    --- PASS: TestAppUpdateStatus_all_apps/update_shared_credentials_app (22.42s)
    --- PASS: TestAppUpdateStatus_all_apps/update_SWA_app (22.32s)
    --- PASS: TestAppUpdateStatus_all_apps/update_three_field_app (23.68s)
PASS
ok      github.com/okta/terraform-provider-okta/okta    223.006s

Classic Org

$ TF_ACC=1 go test -tags unit -mod=readonly -test.v -run ^TestAppUpdateStatus_all_apps$ ./okta 2>&1
=== RUN   TestAppUpdateStatus_all_apps
=== RUN   TestAppUpdateStatus_all_apps/update_auto_login_app
=== RUN   TestAppUpdateStatus_all_apps/update_basic_auth_app
=== RUN   TestAppUpdateStatus_all_apps/update_bookmark_app
=== RUN   TestAppUpdateStatus_all_apps/update_oauth_app
=== RUN   TestAppUpdateStatus_all_apps/update_saml_app
=== RUN   TestAppUpdateStatus_all_apps/update_secure_password_store_app
=== RUN   TestAppUpdateStatus_all_apps/update_shared_credentials_app
=== RUN   TestAppUpdateStatus_all_apps/update_SWA_app
=== RUN   TestAppUpdateStatus_all_apps/update_three_field_app
--- PASS: TestAppUpdateStatus_all_apps (214.85s)
    --- PASS: TestAppUpdateStatus_all_apps/update_auto_login_app (23.53s)
    --- PASS: TestAppUpdateStatus_all_apps/update_basic_auth_app (22.20s)
    --- PASS: TestAppUpdateStatus_all_apps/update_bookmark_app (21.73s)
    --- PASS: TestAppUpdateStatus_all_apps/update_oauth_app (26.89s)
    --- PASS: TestAppUpdateStatus_all_apps/update_saml_app (30.60s)
    --- PASS: TestAppUpdateStatus_all_apps/update_secure_password_store_app (23.69s)
    --- PASS: TestAppUpdateStatus_all_apps/update_shared_credentials_app (22.55s)
    --- PASS: TestAppUpdateStatus_all_apps/update_SWA_app (21.00s)
    --- PASS: TestAppUpdateStatus_all_apps/update_three_field_app (22.67s)
PASS
ok      github.com/okta/terraform-provider-okta/okta    215.485s

Closes #1465

@monde monde marked this pull request as draft November 9, 2023 22:53
@monde monde force-pushed the 1465_okta_app_saml branch 3 times, most recently from b9c68fc to 0b348f2 Compare November 9, 2023 23:52
@monde monde marked this pull request as ready for review November 14, 2023 00:41
@monde monde force-pushed the 1465_okta_app_saml branch 2 times, most recently from d8b6ca5 to c9bbe1c Compare November 14, 2023 22:14
- `okta_app_auto_login`
- `okta_app_basic_auth`
- `okta_app_bookmark`
- `okta_app_oauth`
- `okta_app_saml`
- `okta_app_secure_password_store`
- `okta_app_shared_credentials`
- `okta_app_swa`
- `okta_app_three_field`

Includes ACC tests.

Closes #1465
Classic org but is not replaying correctly in VCR ... remove this
cassette for now.
@monde monde force-pushed the 1465_okta_app_saml branch from 5fe0e33 to a90c2e3 Compare November 15, 2023 22:29
@monde monde merged commit 9c2dbaf into master Nov 15, 2023
2 checks passed
@monde monde deleted the 1465_okta_app_saml branch November 15, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metadata validation failed in okta_app_saml
2 participants