Skip to content

Commit 22c694a

Browse files
authored
Fix upload test when /tmp is empty (#318)
1 parent ce09f28 commit 22c694a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/uploadfile_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
func TestPermStringUnmarshalWithOctal(t *testing.T) {
1111
u := UploadFile{}
1212
yml := []byte(`
13-
src: /tmp
14-
dstDir: /tmp
13+
src: .
14+
dstDir: .
1515
perm: 0755
1616
`)
1717

@@ -22,8 +22,8 @@ perm: 0755
2222
func TestPermStringUnmarshalWithString(t *testing.T) {
2323
u := UploadFile{}
2424
yml := []byte(`
25-
src: /tmp
26-
dstDir: /tmp
25+
src: .
26+
dstDir: .
2727
perm: "0755"
2828
`)
2929

@@ -34,8 +34,8 @@ perm: "0755"
3434
func TestPermStringUnmarshalWithInvalidString(t *testing.T) {
3535
u := UploadFile{}
3636
yml := []byte(`
37-
src: /tmp
38-
dstDir: /tmp
37+
src: .
38+
dstDir: .
3939
perm: u+rwx
4040
`)
4141

@@ -45,8 +45,8 @@ perm: u+rwx
4545
func TestPermStringUnmarshalWithInvalidNumber(t *testing.T) {
4646
u := UploadFile{}
4747
yml := []byte(`
48-
src: /tmp
49-
dstDir: /tmp
48+
src: .
49+
dstDir: .
5050
perm: 0800
5151
`)
5252

@@ -56,8 +56,8 @@ perm: 0800
5656
func TestPermStringUnmarshalWithZero(t *testing.T) {
5757
u := UploadFile{}
5858
yml := []byte(`
59-
src: /tmp
60-
dstDir: /tmp
59+
src: .
60+
dstDir: .
6161
perm: 0
6262
`)
6363

0 commit comments

Comments
 (0)