Skip to content

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

Closed as not planned
@mafredri

Description

@mafredri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions