Skip to content

Commit 57595d3

Browse files
author
rathnapandi
committed
- Fix integration tests #470
1 parent 4097fe7 commit 57595d3

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

modules/apis/src/main/java/com/axway/apim/apiimport/actions/CreateNewAPI.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ public String execute(APIChangeState changes, boolean reCreation) throws AppExce
8181
serviceProfile.setBasePath(backendBasePath);
8282
}
8383
}
84-
//Copy password as gateway responds with empty password for ssl and basic
85-
createdAPI.setAuthenticationProfiles(desiredAPI.getAuthenticationProfiles());
84+
if(desiredAPI.getAuthenticationProfiles() != null) {
85+
//Copy password as gateway responds with empty password for ssl and basic
86+
createdAPI.setAuthenticationProfiles(desiredAPI.getAuthenticationProfiles());
87+
}
8688
// But without updating the Swagger, as we have just imported it!
8789
createdAPI = apiAdapter.updateAPIProxy(createdAPI);
8890
// If an image is included, update it

modules/apis/src/main/java/com/axway/apim/apiimport/actions/UpdateExistingAPI.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public void execute(APIChangeState changes) throws AppException {
3838
// Copy all desired proxy changes into the actual API
3939
APIChangeState.copyChangedProps(desiredAPI, actualAPI, changes.getAllChanges());
4040
actualAPI.setApiMethods(null);
41-
actualAPI.setAuthenticationProfiles(desiredAPI.getAuthenticationProfiles());
41+
if (desiredAPI.getAuthenticationProfiles() != null) {
42+
actualAPI.setAuthenticationProfiles(desiredAPI.getAuthenticationProfiles());
43+
}
4244
List<APIMethod> desiredAPIMethods = desiredAPI.getApiMethods();
4345
ManageApiMethods manageApiMethods = new ManageApiMethods();
4446
manageApiMethods.isMethodMismatch(actualAPIMethods, desiredAPIMethods);

0 commit comments

Comments
 (0)