diff --git a/pipeline/artifactory/artifactory.go b/pipeline/artifactory/artifactory.go index dd4ee9cc3..83f198b14 100644 --- a/pipeline/artifactory/artifactory.go +++ b/pipeline/artifactory/artifactory.go @@ -121,7 +121,6 @@ func doRun(ctx *context.Context) error { switch v := strings.ToLower(instance.Mode); v { case modeArchive: err = runPipeByFilter(ctx, instance, artifact.ByType(artifact.UploadableArchive)) - case modeBinary: err = runPipeByFilter(ctx, instance, artifact.ByType(artifact.UploadableBinary)) diff --git a/pipeline/artifactory/artifactory_test.go b/pipeline/artifactory/artifactory_test.go index 129136eac..7ff9f4908 100644 --- a/pipeline/artifactory/artifactory_test.go +++ b/pipeline/artifactory/artifactory_test.go @@ -242,6 +242,8 @@ func TestRunPipe_ModeArchive(t *testing.T) { Path: debfile.Name(), }) + var uploads = map[string]bool{} + // Dummy artifactories mux.HandleFunc("/example-repo-local/goreleaser/1.0.0/bin.tar.gz", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "PUT") @@ -267,6 +269,7 @@ func TestRunPipe_ModeArchive(t *testing.T) { }, "uri" : "http://127.0.0.1:56563/example-repo-local/goreleaser/bin.tar.gz" }`) + uploads["targz"] = true }) mux.HandleFunc("/example-repo-local/goreleaser/1.0.0/bin.deb", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "PUT") @@ -292,9 +295,12 @@ func TestRunPipe_ModeArchive(t *testing.T) { }, "uri" : "http://127.0.0.1:56563/example-repo-local/goreleaser/bin.deb" }`) + uploads["deb"] = true }) assert.NoError(t, Pipe{}.Run(ctx)) + assert.True(t, uploads["targz"], "tar.gz file was not uploaded") + assert.True(t, uploads["deb"], "deb file was not uploaded") } func TestRunPipe_ArtifactoryDown(t *testing.T) {