#507 Sanity tests should not create temporary files in the current working directory
Closed 5 years ago by praiskup. Opened 5 years ago by frostyx.

After running

beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh

I have a lot of trash files generated by the test, in my current working directory

failed_example_build_id
hello_p3.id
hello_p3.out
pubkey_fork.gpg
pubkey_source.gpg
succeeded_example_build_id
TestDeleteGroupBuild_example_build_id.txt
...

It should not be fixed by removing such files at the end of the test (because it can be interrupted and left them there anyway), but rather by creating them in /tmp.

PS: I am not sure whehter any other tests also do this, let's name them in the comment section.


Also, we can't say, that this is alright because one is supposed to run the test inside of a container. It may be fine, in case you do

[root@test-env ~]# /root/copr/beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh

because then only /root directory in the container gets dirty. However, if you for example do

[root@test-env ~]# cd /root/copr/
[root@test-env copr]# beaker-tests/Sanity/copr-cli-basic-operations/runtest.sh

then you generate untracked files in the git project, which is annoying. Even more because of the fact that they are owned by root:root.

Closing since it seems to be fixed.

Metadata Update from @praiskup:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata