Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmichalak committed Jul 10, 2024
1 parent 460badd commit cc6788d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pkg/datasources/security_integrations_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,15 @@ func TestAcc_SecurityIntegrations_OauthForCustomClients(t *testing.T) {
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.enabled.0.value", "true"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_allow_non_tls_redirect_uri.0.value", "true"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_enforce_pkce.0.value", "true"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_use_secondary_roles.0.value", string(sdk.OauthSecurityIntegrationUseSecondaryRolesImplicit)),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_use_secondary_roles.0.value", string(sdk.OauthSecurityIntegrationUseSecondaryRolesNone)),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.pre_authorized_roles_list.0.value", preAuthorizedRole.ID().Name()),
// Not asserted, because it also contains other default roles
// resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.blocked_roles_list.0.value"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_issue_refresh_tokens.0.value", "true"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_refresh_token_validity.0.value", "86400"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.network_policy.0.value", sdk.NewAccountObjectIdentifier(networkPolicy.Name).Name()), // TODO(SNOW-999049): Fix during identifiers rework
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_client_rsa_public_key_fp.0.value", ""),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_client_rsa_public_key_2_fp.0.value", ""),
resource.TestCheckResourceAttrSet("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_client_rsa_public_key_fp.0.value"),
resource.TestCheckResourceAttrSet("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_client_rsa_public_key_2_fp.0.value"),
resource.TestCheckResourceAttr("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.comment.0.value", comment),
resource.TestCheckResourceAttrSet("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_client_id.0.value"),
resource.TestCheckResourceAttrSet("data.snowflake_security_integrations.test", "security_integrations.0.describe_output.0.oauth_authorization_endpoint.0.value"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
resource "snowflake_scim_integration" "test" {
name = var.name
scim_client = var.scim_client
run_as_role = var.run_as_role
enabled = var.enabled
resource "snowflake_saml2_integration" "test" {
allowed_email_patterns = var.allowed_email_patterns
allowed_user_domains = var.allowed_user_domains
comment = var.comment
enabled = var.enabled
name = var.name
saml2_enable_sp_initiated = var.saml2_enable_sp_initiated
saml2_force_authn = var.saml2_force_authn
saml2_issuer = var.saml2_issuer
saml2_post_logout_redirect_url = var.saml2_post_logout_redirect_url
saml2_provider = var.saml2_provider
saml2_requested_nameid_format = var.saml2_requested_nameid_format
saml2_sign_request = var.saml2_sign_request
saml2_snowflake_acs_url = var.saml2_snowflake_acs_url
saml2_snowflake_issuer_url = var.saml2_snowflake_issuer_url
saml2_sp_initiated_login_page_label = var.saml2_sp_initiated_login_page_label
saml2_sso_url = var.saml2_sso_url
saml2_x509_cert = var.saml2_x509_cert
}

data "snowflake_security_integrations" "test" {
Expand Down

0 comments on commit cc6788d

Please sign in to comment.