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

Enable Unit Tests to Pass on PR Submissions from Forked Repos #2678

Merged
merged 15 commits into from
Jan 5, 2025

Conversation

AlexDickerson
Copy link
Contributor

Currently unit tests are unable to complete successfully due to

  1. Unreliable tests in DownloaderTests
  2. Tests in StandardInstallerTests and NexusApiTests that require an OAuth token be available

This PR fixes the first by removing the offending tests; they did not complete reliably and we're being filtered out in the test action's yaml definition

StandardInstallerTests needed a nexus api token because it was resolving the SKSE download to a mirror on the nexus. This is desirable in most cases but during unit testing it creates an unexpected dependency on Nexus auth. So this adds a flag to Client that retrieves the mirror list that when set to true simply returns an empty list instead.

A more preferable solution there would involve mocking or otherwise supplying a different implementation but making that possible would require a larger refactor that is outside the scope of the goal here of getting unit tests going for PRs.

NexusApiTests requires OAuth as its testing the Nexus API. This is expected so I've added a category to those tests indicating as much. This category is then excluded for runs on branchs that are not main.

@AlexDickerson AlexDickerson changed the title Enable Unit Tests to Pass on PR Submissions Enable Unit Tests to Pass on PR Submissions from Forked Repos Jan 3, 2025
I would like to keep the tests running on the other platform just to be sure. I would like to know if something happens to break on the Linux end
@tr4wzified tr4wzified merged commit 8a1417a into wabbajack-tools:main Jan 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants