Skip to content

Commit

Permalink
- Enabled log for wiremock
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Dec 19, 2023
1 parent 64dbe4f commit 96398c6
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 12 deletions.
5 changes: 0 additions & 5 deletions modules/apim-adapter/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<Console name="STDOUT" target="SYSTEM_OUT">
<PatternLayout pattern="%highlight{%d [%c{1}] %-5level: %msg%n%throwable}{STYLE=Logback}"/>
</Console>
<!-- <File name="file" fileName="logs/apim.log">-->
<!-- <PatternLayout>-->
<!-- <Pattern>%d %p %c{1.} [%t] %m%n</Pattern>-->
<!-- </PatternLayout>-->
<!-- </File>-->
</Appenders>
<Loggers>
<Logger name="com.axway.apim" level="${env:LOG_LEVEL:-info}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ public class WiremockWrapper {
WireMockServer wireMockServer;


public void initWiremock(){
public void initWiremock() {

wireMockServer = new WireMockServer(options().httpsPort(8075).jettyIdleTimeout(30000L).jettyStopTimeout(10000L)
.usingFilesUnderClasspath("wiremock_apim"));
wireMockServer = new WireMockServer(options().httpsPort(8075).jettyIdleTimeout(30000L).jettyStopTimeout(10000L).httpDisabled(true)
.templatingEnabled(false)
.usingFilesUnderClasspath("wiremock_apim"));
System.setProperty("http.keepAlive", "false");
wireMockServer.start();
LOG.info("Wiremock server started");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[{
"id": "82977615-7454-4cac-8b7e-60ce8337879a",
"apiId": "e4ded8c8-0a40-4b50-bc13-552fb7209150",
"createdBy": "40dd53a4-0b13-4485-82e8-63c687404c2f",
"state": "approved",
"createdOn": 1690513519490,
"enabled": true
}]
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"request": {
"method": "GET",
"url": "/api/portal/v1.4/applications/3be01ec6-7254-4ce3-a3f1-87636d59c614/apis"
"urlPath": "/api/portal/v1.4/applications/3be01ec6-7254-4ce3-a3f1-87636d59c614/apis"
},
"response": {
"status": 201,
"bodyFileName": "grantApplicationToAccessApi.json",
"status": 200,
"bodyFileName": "grantApplicationToAccessApis.json",
"headers": {
"Content-Type": "application/json"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"request": {
"method": "POST",
"urlPath": "/api/portal/v1.4/proxies/grantaccess",
"formParameters": {
"action": {
"equalTo": "all_orgs"
},
"apiId": {
"equalTo": "e4ded8c8-0a40-4b50-bc13-552fb7209150"
}
}
},
"response": {
"status": 204
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"request": {
"method": "POST",
"urlPath": "/api/portal/v1.4/proxies/grantaccess",
"formParameters": {
"action": {
"equalTo": "orgs"
},
"apiId": {
"equalTo": "e4ded8c8-0a40-4b50-bc13-552fb7209150"
},
"grantOrgId": {
"equalTo": "987b2afc-b027-41fd-a920-bef182eb4a94"
}
}
},
"response": {
"status": 204
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"request": {
"method": "POST",
"url": "/api/portal/v1.4/applications/3be01ec6-7254-4ce3-a3f1-87636d59c614/apis"
"urlPath": "/api/portal/v1.4/applications/3be01ec6-7254-4ce3-a3f1-87636d59c614/apis"
},
"response": {
"status": 201,
Expand Down

0 comments on commit 96398c6

Please sign in to comment.