Skip to content

Commit

Permalink
Merge branch 'main' into heathj/extra_files
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeyheath authored Apr 27, 2024
2 parents e18f831 + efe3bd2 commit 91855af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
if: ${{ steps.release.outputs.release_created }}
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ release:

brews:
- description: 'Terraform without pain.'
tap:
repository:
owner: chanzuckerberg
name: homebrew-tap
homepage: 'https://github.com/chanzuckerberg/fogg'
Expand Down
13 changes: 6 additions & 7 deletions plugins/custom_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"compress/gzip"
"fmt"
"io"
"io/ioutil"

"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -78,7 +77,7 @@ func TestCustomPluginTarStripComponents(t *testing.T) {
r.NoError(err)
defer os.RemoveAll(d)

cacheDir, err := ioutil.TempDir("", "")
cacheDir, err := os.MkdirTemp("", "")
r.NoError(err)
defer os.RemoveAll(cacheDir)
cache := plugins.GetPluginCache(cacheDir)
Expand Down Expand Up @@ -139,7 +138,7 @@ func TestCustomPluginZip(t *testing.T) {
r.NoError(err)
defer os.RemoveAll(d)

cacheDir, err := ioutil.TempDir("", "")
cacheDir, err := os.MkdirTemp("", "")
r.NoError(err)
defer os.RemoveAll(cacheDir)
cache := plugins.GetPluginCache(cacheDir)
Expand Down Expand Up @@ -189,7 +188,7 @@ func TestCustomPluginBin(t *testing.T) {
defer os.RemoveAll(d)
fileContents := "some contents"

cacheDir, err := ioutil.TempDir("", "")
cacheDir, err := os.MkdirTemp("", "")
r.NoError(err)
defer os.RemoveAll(cacheDir)
cache := plugins.GetPluginCache(cacheDir)
Expand Down Expand Up @@ -220,7 +219,7 @@ func TestCustomPluginBin(t *testing.T) {
f, err := fs.Open(customPluginPath)
r.Nil(err)

contents, err := ioutil.ReadAll(f)
contents, err := io.ReadAll(f)
r.Nil(err)
r.Equal(string(contents), fileContents)

Expand All @@ -233,7 +232,7 @@ func TestCustomPluginBin(t *testing.T) {
func generateTar(t *testing.T, files []string, dirs []string) string {
r := require.New(t)

f, err := ioutil.TempFile("", "testing")
f, err := os.CreateTemp("", "testing")
r.Nil(err)
defer f.Close()
gw := gzip.NewWriter(f)
Expand Down Expand Up @@ -269,7 +268,7 @@ func generateTar(t *testing.T, files []string, dirs []string) string {
// based on https://golangcode.com/create-zip-files-in-go/
func generateZip(t *testing.T, files []string) string {
r := require.New(t)
f, err := ioutil.TempFile("", "testing")
f, err := os.CreateTemp("", "testing")
r.Nil(err)

defer f.Close()
Expand Down

0 comments on commit 91855af

Please sign in to comment.