-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed failing unit test in main #843
Conversation
Signed-off-by: mehab <meha.bhargava@citi.com>
@@ -110,7 +110,7 @@ void testAnalyzer() throws Exception { | |||
Assertions.assertEquals(RepositoryType.NUGET, analyzer.supportedRepositoryType()); | |||
Assertions.assertNotNull(metaModel.getComponent()); | |||
Assertions.assertNotNull(metaModel.getLatestVersion()); | |||
Assertions.assertNotNull(metaModel.getPublishedTimestamp()); | |||
Assertions.assertNull(metaModel.getPublishedTimestamp()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to add a comment on assertion and comment it out rather than asserting on Null
https://api.nuget.org/v3-flatcontainer/nunit/index.json - i checked published dates of other versions from this page and for all other packages have published timestamp except for the latest beta version
Test might start failing again if the registration information of package becomes available or a new stable version is published
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the url that the test is going to is set to return 404 in which case the latest version of the component is the existing version that was set while sending the component in. And the date is not set so it is coming as null
Signed-off-by: mehab <meha.bhargava@citi.com>
@@ -34,6 +35,9 @@ | |||
|
|||
import java.nio.file.Files; | |||
import java.nio.file.Paths; | |||
import java.sql.Date; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm.. is sql date required ?
Signed-off-by: mehab <meha.bhargava@citi.com>
Kudos, SonarCloud Quality Gate passed! |
Fixed failing unit test failing build of main branch