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

Issue with Cleanup Causes Pelican Tests to Fail on Subsequent Runs #1668

Open
Saartank opened this issue Oct 21, 2024 · 0 comments
Open

Issue with Cleanup Causes Pelican Tests to Fail on Subsequent Runs #1668

Saartank opened this issue Oct 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Saartank
Copy link
Collaborator

When running all tests on the main branch in Pelican, the tests run successfully the first time, however, they fail in subsequent runs. The test that fails specifically is:

TestHandleCLIExecutableAlias/no-alias-mixedCase

It turns out this test copies the pelican executable to a different name PELICAN, but the PELICAN file already exists from the previous run, causing the cp command to fail.

The odd thing about this PELICAN file, which causes the problem, is that it is an empty file. Commands such as ls, find, and file do not detect it, and the rm command says that the file does not exist. However, when rm is run with the -f option, it successfully removes the file, and the test passes after that.

I see that in the test, we do os.Stat(arguments[0]) on line 232 in main_test.go to check if the file already exists. However, just like the bash commands mentioned before, os.Stat also fails to detect the file's presence.

image

@Saartank Saartank added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant