Skip to content

Commit

Permalink
Fix #312: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro authored and lburgazzoli committed Jan 13, 2019
1 parent 4390c77 commit 9c9305e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/util/publisher/publisher.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ type PublisherOptions struct {

// Publishes predefined images for all Camel components
func main() {
options := PublisherOptions{}

options := PublisherOptions{
}
var cmd = cobra.Command{
Use: "publisher",
Short: "Publisher allows to publish base images before a release",
Expand Down Expand Up @@ -162,6 +161,7 @@ func (options *PublisherOptions) build(component string, camelVersion string) er
}

archiveDir, archiveName := filepath.Split(ctx.Archive)
// nolint: gosec
dockerfile := `
FROM fabric8/s2i-java:2.3
ADD ` + archiveName + ` /deployments/
Expand Down
3 changes: 3 additions & 0 deletions pkg/controller/integration/build_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func (action *buildContextAction) Handle(ctx context.Context, integration *v1alp
}
if pl.Spec.Build.PredefinedImages {
ictx, err = ImportPredefinedContextIfPresent(ctx, action.client, integration)
if err != nil {
return err
}
}
}

Expand Down
8 changes: 5 additions & 3 deletions pkg/platform/images/images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ limitations under the License.
package images

import (
"github.com/apache/camel-k/version"
"github.com/stretchr/testify/assert"
"strconv"
"testing"

"github.com/apache/camel-k/version"
"github.com/stretchr/testify/assert"
)

func TestImageLookup(t *testing.T) {
Expand Down Expand Up @@ -60,8 +61,9 @@ func TestImageLookup(t *testing.T) {
}

for i, tc := range cases {
testcase := tc
t.Run("case-"+strconv.Itoa(i), func(t *testing.T) {
assert.Equal(t, tc.image, LookupPredefinedImage(tc.dependencies))
assert.Equal(t, testcase.image, LookupPredefinedImage(testcase.dependencies))
})
}

Expand Down

0 comments on commit 9c9305e

Please sign in to comment.