浏览代码

integration-cli: remove uses of ioutils.TempDir

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 年之前
父节点
当前提交
c4c53659f1
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      integration-cli/docker_api_containers_test.go

+ 2 - 3
integration-cli/docker_api_containers_test.go

@@ -26,7 +26,6 @@ import (
 	"github.com/docker/docker/errdefs"
 	"github.com/docker/docker/integration-cli/cli"
 	"github.com/docker/docker/integration-cli/cli/build"
-	"github.com/docker/docker/pkg/ioutils"
 	"github.com/docker/docker/pkg/stringid"
 	"github.com/docker/docker/testutil/request"
 	"github.com/docker/docker/volume"
@@ -1738,7 +1737,7 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsValidation(c *testing.T) {
 	}
 
 	if testEnv.IsLocalDaemon() {
-		tmpDir, err := ioutils.TempDir("", "test-mounts-api")
+		tmpDir, err := os.MkdirTemp("", "test-mounts-api")
 		assert.NilError(c, err)
 		defer os.RemoveAll(tmpDir)
 		cases = append(cases, []testCase{
@@ -2051,7 +2050,7 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) {
 
 		// for modes only supported on Linux
 		if DaemonIsLinux() {
-			tmpDir3, err := ioutils.TempDir("", "test-mounts-api-3")
+			tmpDir3, err := os.MkdirTemp("", "test-mounts-api-3")
 			assert.NilError(c, err)
 			defer os.RemoveAll(tmpDir3)