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

AAP-37989 Tests for exclude list with multiple jobs #15722

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

AlanCoding
Copy link
Member

SUMMARY

This is intended to give coverage for the fix in #15721

The expected failure (looking to see in PR checks) is:

FAILED tests/test_cleanup_task.py::test_folder_cleanup_multiple_running_jobs_execution_node - assert [False, False, False] == [True, True, True]

Because the task should not clean up folders from running jobs, but it does. For the 3 jobs which are actively running in a (simulated) execution node. There are a few hand-wavy things going on to accomplish this in a single docker container (which is not an execution node) but it gets the job done.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

Perfect, the tests report the expected error:

>       assert [os.path.exists(job_dir) for job_dir in job_dirs] == [True for i in range(3)]
E       assert [False, False, False] == [True, True, True]
E         
E         At index 0 diff: False != True
E         Use -v to get more diff

@AlanCoding AlanCoding marked this pull request as ready for review January 2, 2025 21:16
Copy link

sonarqubecloud bot commented Jan 2, 2025

@AlanCoding
Copy link
Member Author

Post-rebase results give:

2025-01-02T21:23:38.3159761Z tests/projects/test_requirements.py .                                    [ 16%]
2025-01-02T21:23:38.6351853Z tests/test_cleanup_task.py .                                             [ 33%]
2025-01-02T21:24:00.2681135Z tests/test_demo_data.py .                                                [ 50%]
2025-01-02T21:24:00.2967830Z tests/test_partitions.py ...                                             [100%]

Since test_cleanup_task was a new file, this necessarily shows that the new test added ran. 🎉 bug fixed.

@AlanCoding AlanCoding changed the title Tests for exclude list with multiple jobs AAP-37989 Tests for exclude list with multiple jobs Jan 2, 2025
@AlanCoding AlanCoding merged commit 9a5ed20 into ansible:devel Jan 2, 2025
27 checks passed
AlanCoding added a commit that referenced this pull request Jan 2, 2025
* Tests for exclude list with multiple jobs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants