Skip to content

Commit

Permalink
Remove hardcoded /tmp in tempfile paths
Browse files Browse the repository at this point in the history
There's no specific need mentioned at the points it was added, and it
makes the Windows-hosted test run setup slightly weird.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
(cherry picked from commit 5b78a9a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
TBBle authored and thaJeztah committed Mar 7, 2023
1 parent 7e382c5 commit c2ed63c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .github/workflows/windows-periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ jobs:
ssh -i $HOME/.ssh/id_rsa ${{ env.SSH_OPTS }} azureuser@${{ env.VM_PUB_IP }} "sh.exe -s" <<EOF
cd c:/containerd
./script/setup/install-cni-windows
mkdir /c/tmp
export TEST_IMAGE_LIST=c:/repolist.toml
make cri-integration | tee c:/Logs/cri-integration.log
EOF
Expand Down
4 changes: 2 additions & 2 deletions integration/container_log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
)

func TestContainerLogWithoutTailingNewLine(t *testing.T) {
testPodLogDir, err := os.MkdirTemp("/tmp", "container-log-without-tailing-newline")
testPodLogDir, err := os.MkdirTemp("", "container-log-without-tailing-newline")
require.NoError(t, err)
defer os.RemoveAll(testPodLogDir)

Expand Down Expand Up @@ -80,7 +80,7 @@ func TestContainerLogWithoutTailingNewLine(t *testing.T) {
}

func TestLongContainerLog(t *testing.T) {
testPodLogDir, err := os.MkdirTemp("/tmp", "long-container-log")
testPodLogDir, err := os.MkdirTemp("", "long-container-log")
require.NoError(t, err)
defer os.RemoveAll(testPodLogDir)

Expand Down
2 changes: 1 addition & 1 deletion integration/pod_dualstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
)

func TestPodDualStack(t *testing.T) {
testPodLogDir, err := os.MkdirTemp("/tmp", "dualstack")
testPodLogDir, err := os.MkdirTemp("", "dualstack")
require.NoError(t, err)
defer os.RemoveAll(testPodLogDir)

Expand Down
2 changes: 1 addition & 1 deletion integration/pod_hostname_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestPodHostname(t *testing.T) {
if test.needsHostNetwork && goruntime.GOOS == "windows" {
t.Skip("Skipped on Windows.")
}
testPodLogDir, err := os.MkdirTemp("/tmp", "hostname")
testPodLogDir, err := os.MkdirTemp("", "hostname")
require.NoError(t, err)
defer os.RemoveAll(testPodLogDir)

Expand Down

0 comments on commit c2ed63c

Please sign in to comment.