Skip to content

Commit

Permalink
chore: Fix lint errors (argoproj#8691)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed May 9, 2022
1 parent 92b3ef2 commit 1a39ae7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/workflow/v1alpha1/workflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ func NewArtifactSearchQuery() *ArtifactSearchQuery {

func (q *ArtifactSearchQuery) anyArtifactGCStrategy() bool {
for _, val := range q.ArtifactGCStrategies {
if val == true {
if val {
return val
}
}
Expand Down Expand Up @@ -1307,7 +1307,7 @@ func (w *Workflow) SearchArtifacts(q *ArtifactSearchQuery) ArtifactSearchResults
if q.NodeId != "" && n.ID != q.NodeId {
match = false
}
if match == true {
if match {
results = append(results, ArtifactSearchResult{Artifact: a, NodeID: n.ID})
}
}
Expand Down
24 changes: 12 additions & 12 deletions test/e2e/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1341,9 +1341,9 @@ func (s *CLISuite) TestWorkflowCopyArtifact() {
Given().
RunCli([]string{"cp", "@latest", "outputDir"}, func(t *testing.T, output string, err error) {
if assert.NoError(t, err) {
assert.Contains(t, output, fmt.Sprintf("Created \"main.log\""))
assert.Contains(t, output, fmt.Sprintf("Created \"hello_world.tgz\""))
assert.Contains(t, output, fmt.Sprintf("Created \"bye_world.tgz\""))
assert.Contains(t, output, "Created \"main.log\"")
assert.Contains(t, output, "Created \"hello_world.tgz\"")
assert.Contains(t, output, "Created \"bye_world.tgz\"")
}
})
os.RemoveAll("outputDir")
Expand All @@ -1356,9 +1356,9 @@ func (s *CLISuite) TestWorkflowCopyArtifact() {
Given().
RunCli([]string{"cp", "@latest", "outputDir", "--template-name", "bye"}, func(t *testing.T, output string, err error) {
if assert.NoError(t, err) {
assert.Contains(t, output, fmt.Sprintf("Created \"main.log\""))
assert.Contains(t, output, fmt.Sprintf("Created \"bye_world.tgz\""))
assert.NotContains(t, output, fmt.Sprintf("Created \"hello_world.tgz\""))
assert.Contains(t, output, "Created \"main.log\"")
assert.Contains(t, output, "Created \"bye_world.tgz\"")
assert.NotContains(t, output, "Created \"hello_world.tgz\"")
}
})
os.RemoveAll("outputDir")
Expand All @@ -1371,9 +1371,9 @@ func (s *CLISuite) TestWorkflowCopyArtifact() {
Given().
RunCli([]string{"cp", "@latest", "outputDir", "--artifact-name", "hello_world"}, func(t *testing.T, output string, err error) {
if assert.NoError(t, err) {
assert.NotContains(t, output, fmt.Sprintf("Created \"main.log\""))
assert.NotContains(t, output, fmt.Sprintf("Created \"bye_world.tgz\""))
assert.Contains(t, output, fmt.Sprintf("Created \"hello_world.tgz\""))
assert.NotContains(t, output, "Created \"main.log\"")
assert.NotContains(t, output, "Created \"bye_world.tgz\"")
assert.Contains(t, output, "Created \"hello_world.tgz\"")
}
})
os.RemoveAll("outputDir")
Expand All @@ -1387,9 +1387,9 @@ func (s *CLISuite) TestWorkflowCopyArtifact() {
RunCli([]string{"cp", "@latest", ".", "--path", "/{templateName}/{artifactName}/"}, func(t *testing.T, output string, err error) {
if assert.NoError(t, err) {
//Assert everything was stored
assert.Contains(t, output, fmt.Sprintf("Created \"main.log\""))
assert.Contains(t, output, fmt.Sprintf("Created \"bye_world.tgz\""))
assert.Contains(t, output, fmt.Sprintf("Created \"hello_world.tgz\""))
assert.Contains(t, output, "Created \"main.log\"")
assert.Contains(t, output, "Created \"bye_world.tgz\"")
assert.Contains(t, output, "Created \"hello_world.tgz\"")
//Assert filepaths are correct
statStrip := func(f os.FileInfo, err error) error {
return err
Expand Down
2 changes: 1 addition & 1 deletion workflow/artifacts/raw/raw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func TestOpenStream(t *testing.T) {
}
driver := &raw.ArtifactDriver{}
rc, err := driver.OpenStream(art)
defer rc.Close()
assert.NoError(t, err)
defer rc.Close()

dat, err := io.ReadAll(rc)
assert.NoError(t, err)
Expand Down

0 comments on commit 1a39ae7

Please sign in to comment.