Moustafa Elkady
02/12/2023, 2:29 PMMoustafa Elkady
02/12/2023, 2:30 PMUri
02/12/2023, 3:55 PMRoman Brühlmann
02/13/2023, 10:07 AM@AutoConfigureWireMock(port = 0)
annotation right now. I could add `.withHeader(HttpHeaders.CONNECTION, "close")`to every single stub, but I guess there is a better more general solution.
Thank youMoustafa Elkady
02/14/2023, 10:31 AMMoustafa Elkady
02/15/2023, 10:13 AMShruti Sagar Mishra
02/15/2023, 5:23 PMHashMap<ExecutionDataKeys, Object> executionStates = new HashMap<>();
WireMockServer wireMockServer = new WireMockServer(
new WireMockConfiguration().port(8080)
.notifier(new Slf4jNotifier(true))
);
wireMockServer.start();
ArrayList<String> hostNames = new ArrayList<>(
Arrays.asList(
"<https://host1.com>",
"<https://host2.com>",
));
hostNames.forEach(host->{
wireMockServer.stubFor(any(urlMatching(host+".*"))
.atPriority(10)
.willReturn(aResponse().proxiedFrom(host)));
});
I have also set proxy in emulator to localhost:8080. But it seems whitlisting is not working. all of my request are getting blocked.
P.S. I am trying to use appium along with wiremock to test state changes in applicationShruti Sagar Mishra
02/15/2023, 5:23 PMShruti Sagar Mishra
02/15/2023, 5:23 PMMingchi Li
02/16/2023, 5:16 PMMingchi Li
02/16/2023, 5:17 PMVtp One
02/17/2023, 9:03 PMPatrick Jansson
02/20/2023, 10:31 AMMikael
02/20/2023, 12:01 PMAdrian Ursu
02/20/2023, 1:44 PMAnkit Singhal
02/21/2023, 6:54 AMAnkur Agarwal
02/21/2023, 10:01 AMAnitt Rajendran
02/22/2023, 11:57 PMAnitt Rajendran
02/23/2023, 12:33 AMUri
02/23/2023, 3:06 AMJamie Tanna [he/him]
02/23/2023, 7:20 AMkareem elkasaby
02/23/2023, 3:27 PMkareem elkasaby
02/23/2023, 3:41 PMup9inc/wiremock-studio:2.32.0-17
and this setup https://wiremock.org/studio/docs/getting-started/kubernetes/kareem elkasaby
02/23/2023, 3:42 PMAlexander Ashitkin
02/23/2023, 4:25 PMjava.lang.NullPointerException: No password supplied for PKCS#12 KeyStore.
at org.bouncycastle.jcajce.provider.ProvPKCS12$PKCS12KeyStoreSpi.engineLoad(Unknown Source)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)
at java.base/sun.security.ssl.TrustStoreManager$TrustAnchorManager.loadKeyStore(TrustStoreManager.java:365)
at java.base/sun.security.ssl.TrustStoreManager$TrustAnchorManager.getTrustedCerts(TrustStoreManager.java:313)
at java.base/sun.security.ssl.TrustStoreManager.getTrustedCerts(TrustStoreManager.java:55)
at java.base/sun.security.ssl.TrustManagerFactoryImpl.engineInit(TrustManagerFactoryImpl.java:49)
at java.base/javax.net.ssl.TrustManagerFactory.init(TrustManagerFactory.java:278)
at com.github.tomakehurst.wiremock.http.ssl.SSLContextBuilder.loadTrustManagers(SSLContextBuilder.java:92)
at com.github.tomakehurst.wiremock.http.ssl.SSLContextBuilder.loadDefaultTrustManagers(SSLContextBuilder.java:99)
at com.github.tomakehurst.wiremock.http.ssl.SSLContextBuilder.loadTrustMaterial(SSLContextBuilder.java:82)
at com.github.tomakehurst.wiremock.http.HttpClientFactory.buildAllowAnythingSSLContext(HttpClientFactory.java:222)
at com.github.tomakehurst.wiremock.http.HttpClientFactory.buildSslContext(HttpClientFactory.java:154)
at com.github.tomakehurst.wiremock.http.HttpClientFactory.createClient(HttpClientFactory.java:111)
at com.github.tomakehurst.wiremock.http.ProxyResponseRenderer.<init>(ProxyResponseRenderer.java:82)
at com.github.tomakehurst.wiremock.core.WireMockApp.buildStubRequestHandler(WireMockApp.java:181)
at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:72)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.startServerIfRequired(WireMockExtension.java:144)
at com.github.tomakehurst.wiremock.junit5.WireMockExtension.beforeAll(WireMockExtension.java:206)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
I use wire mock in a basic (plain connection/no proxy) scenario, but because of application-wide SSL configuration, it fails:
• Wiremock doesn’t pick up keystore or trust store types from the options - it uses default types. So it picks up the default pkcs12 store type, which is not fips compatible and fails.
• And I cannot work it around by reconfiguring the SSL layer just to let Wiremock run. I tried different options but it seems the only way forward is to configure wiremock server in SSL mode - generate self-signed certs, etc. It feels redundant.
Do you know if I can bypass the SSL setup completely? I use httpsEnabled=false
and don’t need it in my scenarios.
Thank youGopal Purohit
02/24/2023, 10:30 AMGopal Purohit
02/24/2023, 10:30 AMRoger Parkinson
02/27/2023, 4:20 AM{
"request": {
"method": "POST",
"url": "/middleware-nz-sandbox/v2.0/domestic-payment-consents",
"headers": {
"x-fapi-interaction-id": {
"equalTo": "okay"
}
}
},
"response": {
"status": 201,
"bodyFileName": "payment-consents.json"
}
},
{
"request": {
"method": "POST",
"url": "/middleware-nz-sandbox/v2.0/domestic-payment-consents",
"headers": {
"x-fapi-interaction-id": {
"equalTo": "error"
}
}
},
"response": {
"status": 500,
"bodyFileName": "payment-consents-error.json"
}
},
So I want the requests that match the URL and which have a header of 'okay' to match the first, and if they match the same url but have a header of 'error' I want to match the second. However they always match the first route. I'm running this. I run Wiremock as a standalone image, one of several started by docker-compose. It works fine in most cases but in this one case the matching is not working how I had hoped.
(version of Wiremock: 2.32.0)
Have I got a mistake in the routes file or does this just not work? ThanksTom
02/27/2023, 3:57 PMJamie Tanna [he/him]
02/27/2023, 5:47 PM