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 staticheck and add to linter #13

Merged
merged 1 commit into from
Jan 9, 2023
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
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() {
Sharpz7 marked this conversation as resolved.
Show resolved Hide resolved
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