Skip to content

Commit d6d2c82

Browse files
author
rathnapandi
committed
- Fix junit test
1 parent 1f8ff86 commit d6d2c82

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

modules/apim-adapter/src/main/java/com/axway/apim/adapter/apis/APIManagerAPIAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public API getUniqueAPI(List<API> foundAPIs, APIFilter filter) throws AppExcepti
184184
Map<String, List<API>> apisPerKey = new HashMap<>();
185185
// Create a List of APIs based on the logical keys
186186
for (API api : foundAPIs) {
187-
String key = api.getPath() + "###" + api.getVhost() + "###" + getVersion(api) + "###" + api.getState();
187+
String key = api.getPath() + "###" + api.getVhost() + "###" + getVersion(api);
188188
if (apisPerKey.containsKey(key)) {
189189
apisPerKey.get(key).add(api);
190190
} else {
@@ -193,7 +193,7 @@ public API getUniqueAPI(List<API> foundAPIs, APIFilter filter) throws AppExcepti
193193
apisPerKey.put(key, apiWithKey);
194194
}
195195
}
196-
String filterKey = filter.getApiPath() + "###" + filter.getVhost() + "###" + getVersion(filter) + "###" + filter.getState();
196+
String filterKey = filter.getApiPath() + "###" + filter.getVhost() + "###" + getVersion(filter);
197197
if (apisPerKey.get(filterKey) != null && apisPerKey.get(filterKey).size() == 1) {
198198
return apisPerKey.get(filterKey).get(0);
199199
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"request": {
3+
"method": "GET",
4+
"url": "/api/portal/v1.4/proxies?field=path&op=eq&value=%2Fv1%2Fapi&field=state&op=eq&value=published"
5+
},
6+
"response": {
7+
"status": 200,
8+
"bodyFileName": "frontend_api_by_id.json",
9+
"headers": {
10+
"Content-Type": "application/json"
11+
}
12+
}
13+
}

modules/apim-cli-tests/src/main/resources/wiremock_apim/mappings/getFrontendByPathAndState.json renamed to modules/apim-cli-tests/src/main/resources/wiremock_apim/mappings/getFrontendByPathAndStateNotEquals.json

File renamed without changes.

0 commit comments

Comments
 (0)