Skip to content

Commit

Permalink
Fix test cases to stop creating DCR apps from the same app name
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakith-Rambukkanage committed Mar 11, 2024
1 parent 3b4f6d7 commit fd2ecea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
* Add APIs with the endpoint security and invoke. Endpoint application was developed to return thr security token in
Expand Down Expand Up @@ -132,10 +133,10 @@ public void initialize() throws Exception {
sandboxApplication = restAPIStore
.generateKeys(applicationID, "3600", null, ApplicationKeyGenerateRequestDTO.KeyTypeEnum.SANDBOX,
null, grantTypes);
DCRParamRequest oauthAppProduction = new DCRParamRequest("dummyapp--production", null, null,
DCRParamRequest oauthAppProduction = new DCRParamRequest(UUID.randomUUID().toString(), null, null,
user.getUserName(), "password client_credentials", dcrURL, user.getUserName(),
user.getPassword(), null);
DCRParamRequest oauthAppSandbox = new DCRParamRequest("dummyapp--sandbox", null, null, user.getUserName(),
DCRParamRequest oauthAppSandbox = new DCRParamRequest(UUID.randomUUID().toString(), null, null, user.getUserName(),
"password client_credentials", dcrURL, user.getUserName(), user.getPassword(), null);
applicationKeyBeanProduction = ClientAuthenticator.makeDCRRequest(oauthAppProduction);
applicationKeyBeanSandbox = ClientAuthenticator.makeDCRRequest(oauthAppSandbox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
* Change the endpoint security of APi and invoke. Endpoint application was developed to return thr security token in
Expand Down Expand Up @@ -148,10 +149,10 @@ public void initialize() throws Exception {
sandboxApplication = restAPIStore
.generateKeys(applicationID, "3600", null, ApplicationKeyGenerateRequestDTO.KeyTypeEnum.SANDBOX,
null, grantTypes);
DCRParamRequest oauthAppProduction = new DCRParamRequest("dummyapp--production", null, null,
DCRParamRequest oauthAppProduction = new DCRParamRequest(UUID.randomUUID().toString(), null, null,
user.getUserName(), "password client_credentials", dcrURL, user.getUserName(),
user.getPassword(), null);
DCRParamRequest oauthAppSandbox = new DCRParamRequest("dummyapp--sandbox", null, null, user.getUserName(),
DCRParamRequest oauthAppSandbox = new DCRParamRequest(UUID.randomUUID().toString(), null, null, user.getUserName(),
"password client_credentials", dcrURL, user.getUserName(), user.getPassword(), null);
applicationKeyBeanProduction = ClientAuthenticator.makeDCRRequest(oauthAppProduction);
applicationKeyBeanSandbox = ClientAuthenticator.makeDCRRequest(oauthAppSandbox);
Expand Down

0 comments on commit fd2ecea

Please sign in to comment.