Skip to content

Commit

Permalink
Fix temp dir creation
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
  • Loading branch information
gabriel-samfira committed Jan 31, 2023
1 parent 2b4816b commit 0f2ae9b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions internal/winapi/zsyscall_windows.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/functional/uvm_mem_backingtype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package functional
import (
"context"
"io"
"os"
"testing"

"github.com/Microsoft/hcsshim/internal/uvm"
Expand Down
1 change: 1 addition & 0 deletions test/functional/uvm_memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package functional

import (
"context"
"os"
"testing"
"time"

Expand Down
1 change: 1 addition & 0 deletions test/functional/uvm_properties_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package functional

import (
"context"
"os"
"testing"

"github.com/Microsoft/hcsshim/osversion"
Expand Down
1 change: 0 additions & 1 deletion test/functional/uvm_scsi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func TestSCSIAddRemoveWCOW(t *testing.T) {
u, layers, uvmScratchDir := tuvm.CreateWCOWUVM(context.Background(), t, t.Name(), "mcr.microsoft.com/windows/nanoserver:1903")
defer os.RemoveAll(uvmScratchDir)
defer u.Close()
layers := testutilities.CreateWCOWBlankBaseLayer(context.Background(), t)
defer os.RemoveAll(layers[0])

testSCSIAddRemoveSingle(t, u, `c:\`, "windows", layers)
Expand Down
1 change: 1 addition & 0 deletions test/functional/uvm_vsmb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package functional
import (
"context"
"errors"
"os"
"testing"

"github.com/Microsoft/hcsshim/internal/hcs"
Expand Down
2 changes: 1 addition & 1 deletion test/internal/scratch.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func init() {
// can be used as the base of a WCOW RW layer when it's not going to be the container's
// scratch mount.
func CreateWCOWBlankBaseLayer(ctx context.Context, t *testing.T) []string {
tempDir := CreateTempDir(t)
tempDir := t.TempDir()
if err := wclayer.ConvertToBaseLayer(context.Background(), tempDir); err != nil {
t.Fatalf("Failed ConvertToBaseLayer: %s", err)
}
Expand Down

0 comments on commit 0f2ae9b

Please sign in to comment.