You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a quite custom setup where we run integration tests for a Node application on Linux and Windows. We use mmock to mock out couple of outside systems. For a new operation, we do file downloads and therefore would like to use file.contents. Below is the configuration we use currently:
This works on Linux, as we can guarantee that the file is present there. However, on Windows, specifically the Azure pipeline we have, we cannot use Linux containers and need to start mmock natively. The mmock configuration is checked into Git, which on Azure pipelines gets cloned to something like D:/a/1/s. Therefore, the current mmock configuration does not work.
I saw that the file.contents replacements uses io.ReadFile under the hood, which I think needs absolute paths to work. What would help for our scenario is if file.contents would support paths relative to the configuration file, e.g.:
so if we save this config file to /config/config.json, mmock would resolve the path for test_file.txt to /config/test_file.txt on Linux and D:/a/1/s/config/test_file.txt on Windows.
The text was updated successfully, but these errors were encountered:
Hello!
We have a quite custom setup where we run integration tests for a Node application on Linux and Windows. We use
mmock
to mock out couple of outside systems. For a new operation, we do file downloads and therefore would like to usefile.contents
. Below is the configuration we use currently:This works on Linux, as we can guarantee that the file is present there. However, on Windows, specifically the Azure pipeline we have, we cannot use Linux containers and need to start
mmock
natively. Themmock
configuration is checked into Git, which on Azure pipelines gets cloned to something likeD:/a/1/s
. Therefore, the currentmmock
configuration does not work.I saw that the
file.contents
replacements usesio.ReadFile
under the hood, which I think needs absolute paths to work. What would help for our scenario is iffile.contents
would support paths relative to the configuration file, e.g.:so if we save this config file to
/config/config.json
,mmock
would resolve the path fortest_file.txt
to/config/test_file.txt
on Linux andD:/a/1/s/config/test_file.txt
on Windows.The text was updated successfully, but these errors were encountered: