Skip to content
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

fix(tests): Fix tests failing on artifact #630

Merged
merged 2 commits into from
May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
korkVersion=7.42.13
korkVersion=7.43.0
org.gradle.parallel=true
spinnakerGradleVersion=8.1.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ class CloudProviderBakeHandlerSpec extends Specification implements TestDefaults

where:
bakeRequest | bakeRecipe | expectedName | expectedVersion | expectedReference | expectedMetadata
null | null | null | null | SOME_AMI_ID | ["build_info_url": null, "build_number": null]
null | SOME_BAKE_RECIPE | SOME_BAKE_RECIPE_NAME | null | SOME_AMI_ID | ["build_info_url": null, "build_number": null]
SOME_BAKE_REQUEST | SOME_BAKE_RECIPE | SOME_BAKE_RECIPE_NAME | null | SOME_AMI_ID | ["build_info_url": SOME_BUILD_INFO_URL, "build_number": SOME_BUILD_NR]
null | null | "" | "" | SOME_AMI_ID | ["build_info_url": null, "build_number": null]
null | SOME_BAKE_RECIPE | SOME_BAKE_RECIPE_NAME | "" | SOME_AMI_ID | ["build_info_url": null, "build_number": null]
SOME_BAKE_REQUEST | SOME_BAKE_RECIPE | SOME_BAKE_RECIPE_NAME | "" | SOME_AMI_ID | ["build_info_url": SOME_BUILD_INFO_URL, "build_number": SOME_BUILD_NR]

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private static Path validateArchiveEntry(String archiveEntryName, Path outputPat

protected void downloadArtifactToTmpFileStructure(
BakeManifestEnvironment env, Artifact artifact, String referenceBaseURL) throws IOException {
if (artifact.getReference() == null) {
if (artifact.getReference() == null || artifact.getReference().isEmpty()) {
throw new InvalidRequestException("Input artifact has an empty 'reference' field.");
}
Path artifactFileName = Paths.get(extractArtifactName(artifact, referenceBaseURL));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class HelmTemplateUtilsSpec extends Specification {
def helmProperties = Mock(RoscoHelmConfigurationProperties)
def helmTemplateUtils = new HelmTemplateUtils(artifactDownloader, helmProperties)
def request = new HelmBakeManifestRequest()
def artifact = Mock(Artifact)
def artifact = Artifact.builder().build()
request.inputArtifacts = [artifact]
request.namespace = "default"
request.overrides = [:]
Expand Down