Fix member repo tests - #102
Arshadul-Monir wants to merge 6 commits into
Conversation
|
|
||
| Optional<Member> getMemberByEmail(String email); | ||
|
|
||
| boolean deleteMemberById(UUID id); |
There was a problem hiding this comment.
again, we shouldn't be introducing methods that are solely used in tests (unless i missed something where it was used elsewhere)
There was a problem hiding this comment.
It was added so that, to delete the testing user, you don't have to re-import JdbcClient into the test file to call the deletion function
There was a problem hiding this comment.
Understood that it's easier, but we should still never be doing this. It's confusing and miscommunicates the purpose of the class signature.
We shouldn't even really be persisting state like the user across multiple tests. It should be instantiated with separate state for each test.
The latter is not really a big issue though. You can automatically have the users deleted after each test by annotating the class with a @transactional annotation. This rolls back all of the transactions in the test after it's done
There was a problem hiding this comment.
|
backend tests and sonarcloud failing |
f7e0111 to
c72e0db
Compare
Graphite Automations"Request reviewers once CI passes" took an action on this PR • (09/12/26)1 reviewer was added to this PR based on Henry Chen's automation. |
15173cf to
b6bc9d0
Compare
b6bc9d0 to
cc12d5e
Compare
cc12d5e to
038c2c6
Compare
|



SQL files are better tested via integration testing. MemberSqlRepoTest is now being tested via SpringBootTest rather than being a unit test.