Skip to content

Commit

Permalink
fix: added checks on delete command test for lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jrangelramos committed May 11, 2021
1 parent 203b0f2 commit 94e387c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cmd/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,24 @@ annotations: {}
}
defer f.Close()

f.WriteString(funcYaml)
_, err = f.WriteString(funcYaml)
if err != nil {
t.Fatal(err)
}
f.Close()


oldWD, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
defer os.Chdir(oldWD)
err = os.Chdir(tmpDir)
defer func() {
err = os.Chdir(oldWD)
if err != nil {
t.Fatal(err)
}
}()
err = os.Chdir(tmpDir)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 94e387c

Please sign in to comment.