mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
saml: fix tests and update method signature that generates random certs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
249446dc52
commit
aa02e30e95
@ -71,7 +71,7 @@ public class GetServiceProviderMetaDataCmdTest {
|
||||
|
||||
String spId = "someSPID";
|
||||
String url = "someUrl";
|
||||
X509Certificate cert = SAMLUtils.generateRandomX509Certification();
|
||||
X509Certificate cert = SAMLUtils.generateRandomX509Certificate();
|
||||
Mockito.when(samlAuthManager.getServiceProviderId()).thenReturn(spId);
|
||||
Mockito.when(samlAuthManager.getIdpSigningKey()).thenReturn(cert);
|
||||
Mockito.when(samlAuthManager.getIdpSingleLogOutUrl()).thenReturn(url);
|
||||
|
||||
@ -133,7 +133,7 @@ public class SAML2LoginAPIAuthenticatorCmdTest {
|
||||
|
||||
String spId = "someSPID";
|
||||
String url = "someUrl";
|
||||
X509Certificate cert = SAMLUtils.generateRandomX509Certification();
|
||||
X509Certificate cert = SAMLUtils.generateRandomX509Certificate();
|
||||
Mockito.when(samlAuthManager.getServiceProviderId()).thenReturn(spId);
|
||||
Mockito.when(samlAuthManager.getIdpSigningKey()).thenReturn(null);
|
||||
Mockito.when(samlAuthManager.getIdpSingleSignOnUrl()).thenReturn(url);
|
||||
|
||||
@ -73,7 +73,7 @@ public class SAML2LogoutAPIAuthenticatorCmdTest {
|
||||
|
||||
String spId = "someSPID";
|
||||
String url = "someUrl";
|
||||
X509Certificate cert = SAMLUtils.generateRandomX509Certification();
|
||||
X509Certificate cert = SAMLUtils.generateRandomX509Certificate();
|
||||
Mockito.when(samlAuthManager.getServiceProviderId()).thenReturn(spId);
|
||||
Mockito.when(samlAuthManager.getIdpSigningKey()).thenReturn(cert);
|
||||
Mockito.when(samlAuthManager.getIdpSingleLogOutUrl()).thenReturn(url);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user