Skip to content

Commit 62d107c

Browse files
committed
Update admin_setting_saml_integration_test.go
1 parent c500425 commit 62d107c

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

admin_setting_saml_integration_test.go

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,16 @@ func TestAdminSettings_SAML_Update(t *testing.T) {
116116
})
117117
require.Error(t, err)
118118
})
119-
}
120-
121-
func TestAdminSettings_SAML_RevokeIdpCert(t *testing.T) {
122-
skipUnlessEnterprise(t)
123119

124-
client := testClient(t)
125-
ctx := context.Background()
120+
t.Run("revoke IDP cert", func(t *testing.T) {
121+
_, err := client.Admin.Settings.SAML.Update(ctx, AdminSAMLSettingsUpdateOptions{
122+
Enabled: Bool(true),
123+
IDPCert: String("anotherTestCert"),
124+
})
125+
require.NoError(t, err)
126126

127-
samlSettings, err := client.Admin.Settings.SAML.Read(ctx)
128-
require.NoError(t, err)
129-
if !samlSettings.Enabled {
130-
t.Skip("SAML is not enabled, skipping Revoke IDP Cert test.")
131-
}
132-
samlSettings, err = client.Admin.Settings.SAML.RevokeIdpCert(ctx)
133-
require.NoError(t, err)
134-
assert.NotNil(t, samlSettings.IDPCert)
127+
samlSettings, err = client.Admin.Settings.SAML.RevokeIdpCert(ctx)
128+
require.NoError(t, err)
129+
assert.NotNil(t, samlSettings.IDPCert)
130+
})
135131
}

0 commit comments

Comments
 (0)