Closed Xor-el closed 1 month ago
@Xor-el
Thanks for the report. It seems that the alpine
docker container is broken related to Handlebars.
For now use
var container = new WireMockContainerBuilder()
.WithMappings(Helper.MappingsPath)
.WithImage("sheyenrath/wiremock.net")
.WithAutoRemove(true)
.WithCleanUp(true)
.Build();
Hi @StefH , your suggested workaround works, thanks.
Hi @StefH , your suggested workaround works, thanks.
In the alpine image I created a self-contained + trimmed version of WireMock, this had problems with for example loading extra dll's like Handlebars.
I'll try to release a new version for WireMock NuGets + Docker images today or tomorrow.
@Xor-el I've uploaded a fixed version for the Alpine image. All should work now.
You need to remove your latest local off-course.
Can confirm that this works as expected now. Thanks @StefH for the quick turnaround.
Describe the bug
something seems to be broken in the WireMock.Net Handlebars
Random
helper (WireMock.Net.Testcontainers 1.6.4 was the last functional version for me).Expected behavior:
The HandleBar Random Helper should work as expected.
Expected Data Logged on Console
=================================Starting Tests================================= Content Response = OK Content Response Content = {"rate":168} // rate can be any random integer between 150 and 300
Actual Data Logged on Console
=================================Starting Tests================================= Content Response = InternalServerError Content Response Content = {"Status":"Template references a helper that cannot be resolved. Helper 'Random'"}
Test to reproduce
Other related info
Docker is needed to run the Demo as it uses WireMock.NET Test Container.