Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win11] It is not possible to change the default root_dir #96

Open
Saex05 opened this issue Sep 19, 2023 · 2 comments
Open

[Win11] It is not possible to change the default root_dir #96

Saex05 opened this issue Sep 19, 2023 · 2 comments
Labels

Comments

@Saex05
Copy link

Saex05 commented Sep 19, 2023

Proposal

It is not possible to modify the root_dir using win11 because the attribute "--root-dir" contains "=" like an extra character and when this character is used to run wiremock-standalone the mappings file and __files file are created in "C:/" and not in the expected path.

cmd.append("--root-dir=")

Python Script to reproduce the bug:

import requests
from pathlib import Path
from wiremock.server.server import WireMockServer
from wiremock.constants import Config

with WireMockServer(port=8080, root_dir=Path('wiremock_demo').absolute()) as wm:
    Config.base_url = 'http://localhost:{}'.format(wm.port)
    response = requests.get(Config.base_url + "/users")
    print(response.status_code)
    print(response.json())

Expected command:
image

Reproduction steps

  • Run this command
    java -jar wiremock-standalone-3.1.0.jar --root-dir= "C:\<some path>"
  • Verify that the mappings and __files files are not created in the expected path
  • Verify that the mappings and __files files are created in C:/

References

No response

@Saex05 Saex05 added the bug label Sep 19, 2023
@simonjgould
Copy link
Contributor

I duplicated this #100

I am happy to submit a PR for this fix if required

@simonjgould
Copy link
Contributor

pr put in containing fix #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants