Skip to content

Commit 34dd074

Browse files
committed
command fix3
1 parent 29d8fcf commit 34dd074

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

tests/e2e/gc_block_volume_expansion.go

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
237237
"exec",
238238
pod.Name,
239239
"--namespace=" + namespace,
240-
"powershell.exe -Command",
240+
"--",
241+
"powershell.exe",
242+
"-Command",
241243
"'$out = New-Object byte[] 536870912; (New-Object Random).NextBytes($out); " +
242244
"[System.IO.File]::WriteAllBytes('/mnt/volume1/testdata2.txt', $out)'",
243245
}
@@ -361,7 +363,9 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
361363
"exec",
362364
pod.Name,
363365
"--namespace=" + namespace,
364-
"powershell.exe -Command",
366+
"--",
367+
"powershell.exe",
368+
"-Command",
365369
"Copy-Item -Path '/mnt/volume1/testdata2.txt' " +
366370
"-Destination '/mnt/volume1/testdata2_pod.txt'",
367371
}
@@ -381,7 +385,9 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
381385
"exec",
382386
pod.Name,
383387
"--namespace=" + namespace,
384-
"powershell.exe -Command",
388+
"--",
389+
"powershell.exe",
390+
"-Command",
385391
"((Get-FileHash '/mnt/volume1/testdata2.txt' -Algorithm SHA256).Hash -eq " +
386392
"(Get-FileHash '/mnt/volume1/testdata2_pod.txt' -Algorithm SHA256).Hash)",
387393
}
@@ -1577,10 +1583,13 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
15771583
"exec",
15781584
pod.Name,
15791585
"--namespace=" + namespace,
1580-
"-- powershell.exe -Command",
1581-
"'$out = New-Object byte[] 536870912; (New-Object Random).NextBytes($out); " +
1582-
"[System.IO.File]::WriteAllBytes('/mnt/volume1/testdata2.txt', $out)'",
1586+
"--",
1587+
"powershell.exe",
1588+
"-Command",
1589+
"$out = New-Object byte[] 536870912; (New-Object Random).NextBytes($out); " +
1590+
"[System.IO.File]::WriteAllBytes('/mnt/volume1/testdata2.txt', $out)",
15831591
}
1592+
15841593
_ = e2ekubectl.RunKubectlOrDie(namespace, cmdTestData...)
15851594
} else {
15861595
_ = e2ekubectl.RunKubectlOrDie(namespace, "cp", testdataFile,
@@ -1595,7 +1604,9 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
15951604
"exec",
15961605
pod.Name,
15971606
"--namespace=" + namespace,
1598-
"powershell.exe -Command",
1607+
"--",
1608+
"powershell.exe",
1609+
"-Command",
15991610
"Copy-Item -Path '/mnt/volume1/testdata2.txt' " +
16001611
"-Destination '/mnt/volume1/testdata2_pod.txt'",
16011612
}
@@ -1616,7 +1627,9 @@ var _ = ginkgo.Describe("[csi-guest] Volume Expansion Test", func() {
16161627
"exec",
16171628
pod.Name,
16181629
"--namespace=" + namespace,
1619-
"powershell.exe -Command",
1630+
"--",
1631+
"powershell.exe",
1632+
"-Command",
16201633
"((Get-FileHash '/mnt/volume1/testdata2.txt' -Algorithm SHA256).Hash -eq " +
16211634
"(Get-FileHash '/mnt/volume1/testdata2_pod.txt' -Algorithm SHA256).Hash)",
16221635
}

0 commit comments

Comments
 (0)