-
Notifications
You must be signed in to change notification settings - Fork 658
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
refactor(artifact): moved artifacts (groovy) unit tests to artifacts (java) #1258
Conversation
igor-web/src/main/groovy/com/netflix/spinnaker/igor/artifacts/ArtifactExtractor.java
Outdated
Show resolved
Hide resolved
@@ -37,7 +37,8 @@ public interface ArtifactService { | |||
default List<String> getArtifactVersions( | |||
@Nonnull String type, @Nonnull String name, String releaseStatus) { | |||
List<String> releaseStatuses = new ArrayList<>(); | |||
releaseStatuses.add(releaseStatus); | |||
if (releaseStatus == null) releaseStatuses = null; |
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.
This is more than a refactor. Can we leave the logic changes for a subsequent PR please? It also seems like a strange line of code to add...does it do anything?
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.
Change reverted as this method is not called from unit test.
ArtifactServiceSpec method "service finds artifact versions"()
called getArtifactVersions(String, String, List<String>)
To call same method from ArtifactServiceTest and to resolve the ambiguity issue between the overloaded methods, typecasted null with type List<String>
in serviceFindsArtifactVersions()
…it tests to ArtifactExtractorTest (java)
…ests to ArtifactServiceTest (java)
@VisibleForTesting
--
"service finds artifact versions"()
calledgetArtifactVersions(String, String, List<String>)
To call same method from ArtifactServiceTest and to resolve the ambiguity issue between the overloaded methods, typecasted null with type
List<String>
.