https://linen.dev logo
#wiremock-cloud
Title
# wiremock-cloud
s

Sree Bendapudi

02/29/2024, 6:58 PM
Hello Team - Im creating stubs via wiremock and while doing so encountered an interesting fact w.r.t the date. i have to pass tomorrow as one of t he parameter stating as "Token": "I21426-25439_{{now format='dd_MM_yyyy' offset='+1 days'}} and what im seeing is wiremock not intelligent enough to convey that Feb has only 28 or 29 days and it just adds up +1 to current date and in response sends out value as 02_31_2024 which doesnt even exist. - "Token": "I21426-25439_*02_31_2024*_07_13", if any have already noticed and have a solution to make wiremock think the dates as per calender please share your inputs. Thanks in Advance for the support
t

Tom

02/29/2024, 7:40 PM
I’ve just tried this myself and got:
01_03_2024
That seems right to me. What’s the domain name of the mock API you’re working on?
s

Sree Bendapudi

02/29/2024, 7:41 PM
Thats interesting to hear. same command and works differently
02_31 is never expected
t

Tom

02/29/2024, 7:42 PM
If you point me to your mock API I can take a look
What’s the hostname/base URL of the one you’re working on?
s

Sree Bendapudi

02/29/2024, 7:43 PM
Im trying on inside network of the customer and hence unable to share the details
t

Tom

02/29/2024, 7:43 PM
OK, so you’re not using WireMock Cloud?
s

Sree Bendapudi

02/29/2024, 7:44 PM
how can i check if Im doing wiremock cloud or not?
t

Tom

02/29/2024, 7:44 PM
WireMock Cloud is a SaaS product so you’d have signed up and would be working in a web UI
If you’re using standalone/Docker/Java then you’re on the OSS product
How did you create the stub that returned this value?
s

Sree Bendapudi

02/29/2024, 7:45 PM
using
wiremock-jre8-standalone-2.33.2.jar
t

Tom

02/29/2024, 7:45 PM
That’s quite an old version. I would suggest upgrading to 3.4.2.
s

Sree Bendapudi

02/29/2024, 7:45 PM
3.4.2 is new standalone version?
t

Tom

02/29/2024, 7:46 PM
Yes, that’s the latest
Slightly different artifact ID though - it’s
wiremock-standalone-3.4.2.jar
s

Sree Bendapudi

02/29/2024, 7:46 PM
can you point the link so i can download the legit version
t

Tom

02/29/2024, 7:46 PM
(without the
jre8
part)
s

Sree Bendapudi

02/29/2024, 7:47 PM
3.4.2 invocation everything remains same or its entirely different with new set of commands.. what are pre requiaites to run 3.4.2 version/.
t

Tom

02/29/2024, 7:49 PM
There was very little backwards compatibility breakage in 2->3 so you should be able to use it exactly the same.
s

Sree Bendapudi

02/29/2024, 7:49 PM
Thank you for the quick turn around
👍 1
will try and keep posted for any concerns
t

Tom

02/29/2024, 7:50 PM
No worries. Hopefully the update will cure the problem, but if not please post the stub definition and we can take a closer look.
👍 1
5 Views