Skip to content

Commit

Permalink
ci: updated testing libs locally to match GH actions..
Browse files Browse the repository at this point in the history
  • Loading branch information
mvisonneau committed Aug 27, 2021
1 parent d8a0715 commit 79312b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ misspell: setup ## Test code with misspell

.PHONY: gosec
gosec: setup ## Test code for security vulnerabilities
gosec ./...
gosec -exclude=G307 ./...

.PHONY: test
test: ## Run the tests against the codebase
Expand Down
1 change: 1 addition & 0 deletions internal/cli/cli_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !darwin
// +build !darwin

package cli
Expand Down
16 changes: 2 additions & 14 deletions pkg/tfcw/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,25 +256,13 @@ func (c *Client) renderVariablesLocally(vars schemas.Variables) (err error) {
if err != nil {
return err
}

defer func() {
cerr := envFile.Close()
if err == nil {
err = cerr
}
}()
defer envFile.Close()

tfFile, err := os.OpenFile("./tfcw.auto.tfvars", os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0o600)
if err != nil {
return err
}

defer func() {
cerr := tfFile.Close()
if err == nil {
err = cerr
}
}()
defer tfFile.Close()

variablesWithValues := schemas.VariablesWithValues{}
values := make(chan *schemas.VariableWithValue)
Expand Down

0 comments on commit 79312b5

Please sign in to comment.