Skip to content

Running the test suite pollutes /tmp with terraform zips and binaries #3159

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

Closed
mafredri opened this issue Jul 25, 2022 · 1 comment
Closed

Comments

@mafredri
Copy link
Member

I was wondering why I'm constantly running out of disk space, it seems that simply running the test suite (e.g. make test-postgres) dumps a bunch of terraform binaries into /tmp.

du -chs /tmp/terraform*
19M	/tmp/terraform_1.1.9_linux_amd64.zip1190379589
19M	/tmp/terraform_1.1.9_linux_amd64.zip1836912404
19M	/tmp/terraform_1.1.9_linux_amd64.zip1986936999
19M	/tmp/terraform_1.1.9_linux_amd64.zip213693430
19M	/tmp/terraform_1.1.9_linux_amd64.zip2720519155
19M	/tmp/terraform_1.1.9_linux_amd64.zip2875483850
19M	/tmp/terraform_1.1.9_linux_amd64.zip3877786099
19M	/tmp/terraform_1.1.9_linux_amd64.zip4119018959
19M	/tmp/terraform_1.1.9_linux_amd64.zip530907205
19M	/tmp/terraform_1.1.9_linux_amd64.zip856077071
62M	/tmp/terraform_2048878246
62M	/tmp/terraform_2377667468
62M	/tmp/terraform_394836709
370M	total

This is the files from one run.

This is most likely slowing down our tests -- we're downloading ~200MB of zips when we should at most download it once to test that the process works.

Minimum viable fix is to ensure these end up in a t.TempDir() that's cleaned up at the end of the test.

@kylecarbs
Copy link
Member

I believe we do this a lot less now... to the point where it probably isn't a problem. Feel free to re-open if you disagree!

@kylecarbs kylecarbs closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants