Skip to content

Commit

Permalink
fix staticheck and add to linter (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
kannon92 authored Jan 9, 2023
1 parent cfc9903 commit 0a249ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ linters:
- errcheck
- govet
- gosimple
- staticcheck

8 changes: 6 additions & 2 deletions controllers/install/binoculars_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ var _ = Describe("Armada Operator", func() {
It("Kubernetes should create Executor Kubernetes resources", func() {
By("Calling the Executor Controller Reconcile function", func() {
f, err := utils.CreateTempFile([]byte(binocularsYaml))
defer f.Close()
defer os.Remove(f.Name())
defer func() {
Expect(f.Close()).ToNot(HaveOccurred())
}()
defer func() {
Expect(os.Remove(f.Name())).ToNot(HaveOccurred())
}()
Expect(err).ToNot(HaveOccurred())

k, err := testUser.Kubectl()
Expand Down
8 changes: 6 additions & 2 deletions controllers/install/executor_controller_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ var _ = Describe("Armada Operator", func() {
It("Kubernetes should create Executor Kubernetes resources", func() {
By("Calling the Executor Controller Reconcile function", func() {
f, err := utils.CreateTempFile([]byte(executorYaml))
defer f.Close()
defer os.Remove(f.Name())
defer func() {
Expect(f.Close()).ToNot(HaveOccurred())
}()
defer func() {
Expect(os.Remove(f.Name())).ToNot(HaveOccurred())
}()
Expect(err).ToNot(HaveOccurred())

k, err := testUser.Kubectl()
Expand Down

0 comments on commit 0a249ca

Please sign in to comment.