diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-27 08:39:31 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-09-09 06:07:22 +0300 |
commit | 9bc6df51b36a1e0f763b6ebc7974bb3d98aabf3a (patch) | |
tree | 28b88e9c3b6f2a16650164c15a28bfc62360763f /test/acceptance/helpers_test.go | |
parent | 9dd40765e162aba80482abdf3ca8f788bec7a8db (diff) |
refactor: move away from ioutil (deprecated)
Diffstat (limited to 'test/acceptance/helpers_test.go')
-rw-r--r-- | test/acceptance/helpers_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/acceptance/helpers_test.go b/test/acceptance/helpers_test.go index b8181dca..33a19127 100644 --- a/test/acceptance/helpers_test.go +++ b/test/acceptance/helpers_test.go @@ -8,7 +8,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "net" "net/http" "net/http/httptest" @@ -261,7 +260,7 @@ func RunPagesProcessWithSSLCertFile(t *testing.T, listeners []ListenSpec, sslCer func RunPagesProcessWithSSLCertDir(t *testing.T, listeners []ListenSpec, sslCertFile string) { // Create temporary cert dir - sslCertDir, err := ioutil.TempDir("", "pages-test-SSL_CERT_DIR") + sslCertDir, err := os.MkdirTemp("", "pages-test-SSL_CERT_DIR") require.NoError(t, err) // Copy sslCertFile into temp cert dir @@ -621,7 +620,7 @@ func defaultUserHandler(t *testing.T, opts *stubOpts) http.HandlerFunc { func newConfigFile(t *testing.T, configs ...string) string { t.Helper() - f, err := ioutil.TempFile(os.TempDir(), "gitlab-pages-config") + f, err := os.CreateTemp(os.TempDir(), "gitlab-pages-config") require.NoError(t, err) defer f.Close() |