Enable Unit Tests to Pass on PR Submissions from Forked Repos #2678
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently unit tests are unable to complete successfully due to
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.