Skip to content

Refresh test user dir on each test run#3259

Merged
scarf005 merged 2 commits intouploadfrom
fix-stale
Sep 25, 2023
Merged

Refresh test user dir on each test run#3259
scarf005 merged 2 commits intouploadfrom
fix-stale

Conversation

@olanti-p
Copy link
Copy Markdown
Contributor

Summary

SUMMARY: Infrastructure "Fix stale config remaining between test invocations."

Purpose of change

Fix stale config poisoning consecutive test runs #3208 (review)

Describe the solution

Re-create test user dir before running tests

Testing

Before:
Run tests, change language in options to ru, run tests again, see error.
After:
No error occurs.

@olanti-p olanti-p marked this pull request as ready for review September 25, 2023 16:32
@github-actions github-actions bot added the tests changes related to tests label Sep 25, 2023
@github-actions github-actions bot added the src changes related to source code. label Sep 25, 2023
@scarf005 scarf005 added this pull request to the merge queue Sep 25, 2023
Merged via the queue into upload with commit 1d7d3d4 Sep 25, 2023
@scarf005 scarf005 deleted the fix-stale branch September 25, 2023 20:37
@scarf005
Copy link
Copy Markdown
Member

mmm it doesn't seem to work on my end
image
image

@olanti-p
Copy link
Copy Markdown
Contributor Author

In 1st screenshot, the config at the top of the terminal is standard user config at ./config/, not test config at ./test_user_dir/config, it's ignored when running tests.

In 2nd screenshot, you're checking contents of ./build/tests/test_user_dir, but it's the wrong folder, the tests use ./test_user_dir in current working directory, which was the top project directory, so it should be just lsd ./test_user_dir.

But digging into it further, and it's apparently failing to remove the test user dir because remove_directory is for empty directories only, so since the error is silently ignored, it proceeds with the usual broken route of using stale config. How and why did it work when I tested it I'm not sure, I must've tested wrong.

Don't code and test while sleep deprived, kids.

scarf005 pushed a commit to scarf005/Cataclysm-BN that referenced this pull request Sep 28, 2023
* Refresh user dir on each run

* style(autofix.ci): automated formatting

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

src changes related to source code. tests changes related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants