Skip to content

Commit

Permalink
πŸ› : use ignoring minutes instead of seconds
Browse files Browse the repository at this point in the history
to correct a case when the test fails like this

Error:  Failures:
Error:    GitlabRegistryControllerIT.testImportRepository:116
Expecting:
  <2021-01-29T13:16:59.919233 (java.time.LocalDateTime)>
to have same year, month, day, hour and minute as:
  <2021-01-29T13:17:00.157461 (java.time.LocalDateTime)>
but had not.
  • Loading branch information
juwit committed Feb 2, 2021
1 parent 68227ed commit 29ae28f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class GitlabRegistryControllerIT: SharedMongoContainerTest() {
assertThat(importedModule.name).isEqualTo("selmak/terraform-docker-mongo")

assertThat(importedModule.moduleMetadata.createdBy).isEqualTo(selmak)
assertThat(importedModule.moduleMetadata.createdAt).isEqualToIgnoringSeconds(LocalDateTime.now())
assertThat(importedModule.moduleMetadata.createdAt).isEqualToIgnoringMinutes(LocalDateTime.now())

assertThat(importedModule.gitRepositoryUrl).isEqualTo("https://gitlab.com/selmak/terraform-docker-mongo")
assertThat(importedModule.registryDetails).isEqualTo(RegistryDetails(RegistryType.GITLAB, "16181047"))
Expand Down

0 comments on commit 29ae28f

Please sign in to comment.