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 lint errors #122

Merged
merged 2 commits into from
Sep 23, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/docker/ecr_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (c *AwsAccessConfig) EcrGetLogin(ecrUrl string) (string, string, error) {
accountId := splitUrl[1]
region := splitUrl[2]

log.Println(fmt.Sprintf("Getting ECR token for account: %s in %s..", accountId, region))
log.Printf("Getting ECR token for account: %s in %s..", accountId, region)

// Create new AWS config
config := aws.NewConfig().WithCredentialsChainVerboseErrors(true)
Expand Down
12 changes: 0 additions & 12 deletions post-processor/docker-push/post-processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ func TestPostProcessor_PostProcess(t *testing.T) {
}

result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
if !keep {
t.Fatal("should keep")
}
Expand Down Expand Up @@ -126,9 +123,6 @@ func TestPostProcessor_PostProcess_portInName(t *testing.T) {
}

result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
if !keep {
t.Fatal("should keep")
}
Expand Down Expand Up @@ -159,9 +153,6 @@ func TestPostProcessor_PostProcess_tags(t *testing.T) {
}

result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
if !keep {
t.Fatal("should keep")
}
Expand Down Expand Up @@ -196,9 +187,6 @@ func TestPostProcessor_PostProcess_digestWarning(t *testing.T) {
testUi := testUi()
result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi, artifact)
resultString := readWriter(testUi)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
if !keep {
t.Fatal("should keep")
}
Expand Down
15 changes: 3 additions & 12 deletions post-processor/docker-tag/post-processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ func TestPostProcessor_PostProcess(t *testing.T) {
IdValue: "1234567890abcdef",
}

result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
_, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if !keep {
t.Fatal("should keep")
}
Expand Down Expand Up @@ -89,10 +86,7 @@ func TestPostProcessor_PostProcess_Force(t *testing.T) {
IdValue: "1234567890abcdef",
}

result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
_, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if !keep {
t.Fatal("should keep")
}
Expand Down Expand Up @@ -131,10 +125,7 @@ func TestPostProcessor_PostProcess_NoTag(t *testing.T) {

artifact := &packersdk.MockArtifact{BuilderIdValue: dockerimport.BuilderId, IdValue: "1234567890abcdef"}

result, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if _, ok := result.(packersdk.Artifact); !ok {
t.Fatal("should be instance of Artifact")
}
_, keep, forceOverride, err := p.PostProcess(context.Background(), testUi(), artifact)
if !keep {
t.Fatal("should keep")
}
Expand Down