diff --git a/src/openstack_cpi_golang/cpi/image/root_image/root_image_test.go b/src/openstack_cpi_golang/cpi/image/root_image/root_image_test.go index 1d388fba..a70451a6 100644 --- a/src/openstack_cpi_golang/cpi/image/root_image/root_image_test.go +++ b/src/openstack_cpi_golang/cpi/image/root_image/root_image_test.go @@ -12,7 +12,7 @@ var _ = Describe("RootImage", func() { Context("Get", func() { BeforeEach(func() { - targetDirPath, _ = os.MkdirTemp("/tmp", "unpacked-image-") + targetDirPath, _ = os.MkdirTemp("", "unpacked-image-") }) AfterEach(func() { diff --git a/src/openstack_cpi_golang/cpi/methods/create_stemcell.go b/src/openstack_cpi_golang/cpi/methods/create_stemcell.go index 29114af1..91efbf9c 100644 --- a/src/openstack_cpi_golang/cpi/methods/create_stemcell.go +++ b/src/openstack_cpi_golang/cpi/methods/create_stemcell.go @@ -62,7 +62,7 @@ func (a CreateStemcellMethod) CreateStemcell( imageID, creationError = a.lightStemcellCreator.Create(imageService, cloudProps) } else { - tempDirPath, err := os.MkdirTemp("/tmp", "unpacked-image-") + tempDirPath, err := os.MkdirTemp("", "unpacked-image-") if err != nil { return apiv1.StemcellCID{}, fmt.Errorf("failed to create temp dir: %w", err) }