Fix: Failed unit tests - #46
Conversation
There was a problem hiding this comment.
dotnet-version: 10.0.x → 6.0.x reverts #32. This branch is based on that merge commit, and the solution targets net10.0 — the build only stayed green because the runner picked up an SDK 10 on its own (bin\Release\net10.0 in the log). Please drop this line from the diff.
The begin rewrite lost /d:sonar.coverage.exclusions="/Persistence/Migrations/". Without it EF migrations count towards coverage and the number drops for no real reason — please add it back.
The Set SonarCloud Token step is now dead: >> $GITHUB_ENV is bash syntax and the step runs under pwsh, where $GITHUB_ENV is undefined — it does nothing in the log. Both sonar steps already get the token from env:, so delete the step; that also stops the secret from leaking into every later step's environment.
The blank line added to GetAllMainTeamHandlerTests.cs is left over from the failing-test experiment — please revert it so the PR only touches the workflow. Same for the trailing whitespace after the two sonarscanner steps.
Also, please fill in the description — the two CI run links are the whole evidence for this task and belong in it — assign reviewers, and move card #42 to To Review. For the next one, name the branch fix/42/failed-tests-do-not-drop-build: the convention is type//description, and this is a CI fix rather than tests.
skorpionreser
left a comment
There was a problem hiding this comment.
I don’t see any issues. Before merging, please remove the extra spaces after with: on line 17.
Exlizardium
left a comment
There was a problem hiding this comment.
Extra space after with: is yet to be removed. Other than that all good
98ac2b2
|
M1R4MI
left a comment
There was a problem hiding this comment.
Extra space on line 17 were removed. And the rest of the code looks good
emil720a1
left a comment
There was a problem hiding this comment.
The tests cover the main scenarios, but the predicate assertions currently evaluate expressions only against matching entities, so an incorrect predicate such as entity => true could still pass. Please verify predicates against both matching and non-matching entities. Also, use different values for streetcodeId and categoryId to detect swapped fields, assert the returned DTO instead of only result.IsSuccess, add final newlines to the new files, and update the branch with the latest dev before the final test run.



dev
JIRA
Code reviewers
Second Level Review
Summary of issue
Unit tests could fail without GitHub Actions correctly reporting the failure.
Summary of change
Fixed GitHub Actions to correctly handle unit test execution and failure reporting.
Testing approach
Verified GitHub Actions workflow and SonarCloud Quality Gate.
CHECK LIST