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

Move pytest.ini to mounted folder, change pytest cache dir #97

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

AetherUnbound
Copy link
Collaborator

Description of Changes

This PR fixes an issue I've been experiencing where running pytest in the container will create a .pytest_cache folder as root which prevents the container from being rebuilt.

$ just build
docker-compose --file=docker-compose.yml --file=docker-compose.dev.yml build
postgres uses an image, skipping
minio uses an image, skipping
createbucket uses an image, skipping
Building web
error checking context: 'can't stat '/home/aether/git/OpenOversight/OpenOversight/.pytest_cache''.
ERROR: Service 'web' failed to build
error: Recipe `build` failed on line 21 with exit code 1

This PR changes the cache directory to something that isn't mounted.

Notes for Deployment

Screenshots (if appropriate)

Tests and linting

  • I have rebased my changes on main

  • just lint passes

  • just test passes

@AetherUnbound AetherUnbound added the docker/env Docker, environment, or CI changes label Dec 31, 2021
Copy link
Collaborator

@sarayourfriend sarayourfriend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but the PR title doesn't make sense to me... should it be "Move pytest cache outside mounted folder"?

@AetherUnbound
Copy link
Collaborator Author

Ah, it might not be clear from the diff but I'm also moving where the pytest.ini file is. I'll change the title to reflect both!

@AetherUnbound AetherUnbound changed the title Move pytest.ini into mounted folder Move pytest.ini to mounted folder, change pytest cache dir Dec 31, 2021
@AetherUnbound AetherUnbound merged commit 0ad7b1a into main Dec 31, 2021
@AetherUnbound AetherUnbound deleted the bugfix/test-cache-dir branch December 31, 2021 21:40
@AetherUnbound
Copy link
Collaborator Author

Gah it didn't keep the title change!!! 😡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker/env Docker, environment, or CI changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants