Added check on tests
This commit is contained in:
parent
6fcf847fdf
commit
6602011176
|
@ -66,6 +66,10 @@ public class SecretManagerTest extends ContextTest {
|
|||
String clientId = properties.getProperty(CLIENT_ID_PROPERTY_KEY);
|
||||
String clientSecret = properties.getProperty(root);
|
||||
|
||||
if(clientId==null || clientId.compareTo("")==0 || clientSecret==null || clientSecret.compareTo("")==0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ClientIDManager clientIDManager = new ClientIDManager(clientId, clientSecret);
|
||||
Secret secret = clientIDManager.getSecret(context);
|
||||
Map<String, String> map = secret.getHTTPAuthorizationHeaders();
|
||||
|
@ -93,6 +97,10 @@ public class SecretManagerTest extends ContextTest {
|
|||
String clientId = properties.getProperty(CLIENT_ID_PROPERTY_KEY);
|
||||
String clientSecret = properties.getProperty(root);
|
||||
|
||||
if(clientId==null || clientId.compareTo("")==0 || clientSecret==null || clientSecret.compareTo("")==0) {
|
||||
return;
|
||||
}
|
||||
|
||||
D4ScienceIAMClient iamClient = D4ScienceIAMClient.newInstance(context);
|
||||
D4ScienceIAMClientAuthn d4ScienceIAMClientAuthn = iamClient.authenticate(clientId, clientSecret, context);
|
||||
if(d4ScienceIAMClientAuthn!=null && d4ScienceIAMClientAuthn.canBeRefreshed()) {
|
||||
|
|
Loading…
Reference in New Issue