Skip to content

Mappings not applied when running on Windows #38

Open
@jmabuc

Description

@jmabuc

Proposal

When running the quickstart example on Windows, mappings are not applied and the test fails with a 404 error. The test succeeds when runnig the same example on Windows with WSL. The example should run on Windows as well.
By looking at the code at https://github.com/wiremock/wiremock-testcontainers-go/blob/main/tc-wiremock.go#L97:
ContainerFilePath: filepath.Join("/home/wiremock/mappings", id+".json"),
The path is built by calling filepath.Join. This seems to fail in Windows.

It works fine if the line is changed in the following way:
ContainerFilePath: "/home/wiremock/mappings/" + id + ".json",

This is the same approach used in line https://github.com/wiremock/wiremock-testcontainers-go/blob/main/tc-wiremock.go#L110

Reproduction steps

Run the quickstart example on Windows.

References

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions