Closed daniel-chiuratto-seabra closed 2 months ago
The recent changes in the owlplug-client
codebase aim to streamline Google credentials management. These updates involve adjusting database queries, refining column annotations in model classes, and improving test setup consistency. The modifications enhance credential handling and testing practices.
File Path | Change Summary |
---|---|
.../auth/dao/GoogleCredentialDAO.java .../auth/model/GoogleCredential.java |
Modified GoogleCredentialDAO.java to select credential_key from the GOOGLE_CREDENTIAL table. Updated GoogleCredential.java to specify name = "credential_key" for the key field, ensuring uniqueness. |
.../dao/GoogleCredentialDAOTest.java | Replaced @BeforeAll with @BeforeEach in GoogleCredentialDAOTest.java for the test setup method. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I found out that there is a breaking test in the
GoogleCredentialDAOTest
class regarding a@BeforeAll
annotation being used in anon-static
method. Turning it into a static make the access toEntityManager
problematic, since it is not a big unit test, by turning it into aBeforeEach
should be fine.Also the
key
column name should be avoided becausekey
is a special keyword in the database, therefore I changed the column name fromkey
tocredential_key
in theGoogleCredential
entity and updated theGoogleCredentialDAO
repo accordingly in the native query.Now all tests are passing smoothly.