clay
clay copied to clipboard
Task-api - macos mount denied on test_basic_integration.py
As a task-api developer i want to run basic_integration.py
on mac without specifying a specific temporary directory.
Bug found by @mdtanrikulu
when running:
python scripts/task_api_tests/basic_integration.py task-from-app-def ../tutorialapp/examples/app_descriptor.json ../tutorialapp/examples/app_parameters.json --resources ../tutorialapp/examples/input.txt --max-subtasks=1
There is an error:
docker.errors.APIError: 500 Server Error: Internal Server Error ("b'Mounts denied: \r\nThe path /var/folders/sl/c58rc1jj0c74xr6mrzqx296m0000gn/T/tmpt0ef1fmt/rtm/801964d531675a235c9ddcfda00075cb\r\nis not shared from OS X and is not known to Docker.\r\nYou can configure shared paths from Docker -> Preferences... -> File Sharing.\r\nSee https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.\r\n.'")
That can be solved by specifying the temp dir:
mkdir -p ~/tmp/int2
TMPDIR=~/tmp/int2 python scripts/task_api_tests/basic_integration.py task-from-app-def ...
proposed solution (source): when running this specific test on macos, prefix TMPDIR with /private when the default is used ( env var is empty )