summaryrefslogtreecommitdiff
path: root/pkg/bindings/test
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/test')
-rw-r--r--pkg/bindings/test/auth_test.go3
-rw-r--r--pkg/bindings/test/common_test.go5
2 files changed, 3 insertions, 5 deletions
diff --git a/pkg/bindings/test/auth_test.go b/pkg/bindings/test/auth_test.go
index c4c4b16d8..5b148a51c 100644
--- a/pkg/bindings/test/auth_test.go
+++ b/pkg/bindings/test/auth_test.go
@@ -1,7 +1,6 @@
package bindings_test
import (
- "io/ioutil"
"os"
"time"
@@ -76,7 +75,7 @@ var _ = Describe("Podman images", func() {
imageRef := imageRep + ":" + imageTag
// Create a temporary authentication file.
- tmpFile, err := ioutil.TempFile("", "auth.json.")
+ tmpFile, err := os.CreateTemp("", "auth.json.")
Expect(err).To(BeNil())
_, err = tmpFile.Write([]byte{'{', '}'})
Expect(err).To(BeNil())
diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go
index 6b0175f59..f174b84f8 100644
--- a/pkg/bindings/test/common_test.go
+++ b/pkg/bindings/test/common_test.go
@@ -3,7 +3,6 @@ package bindings_test
import (
"context"
"fmt"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -146,7 +145,7 @@ func newBindingTest() *bindingTest {
// createTempDirinTempDir create a temp dir with prefix podman_test
func createTempDirInTempDir() (string, error) {
- return ioutil.TempDir("", "libpod_api")
+ return os.MkdirTemp("", "libpod_api")
}
func (b *bindingTest) startAPIService() *gexec.Session {
@@ -264,7 +263,7 @@ var _ = ginkgo.SynchronizedBeforeSuite(func() []byte {
// If running localized tests, the cache dir is created and populated. if the
// tests are remote, this is a no-op
createCache()
- path, err := ioutil.TempDir("", "libpodlock")
+ path, err := os.MkdirTemp("", "libpodlock")
if err != nil {
fmt.Println(err)
os.Exit(1)