Skip to content

Commit 7fc93a3

Browse files
committed
Powershell integration runner flags configured from the outside
1 parent f1ece4d commit 7fc93a3

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

scripts/utils.psm1

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,16 @@ function Restart-CSIProxy {
2525
}
2626

2727
function Run-CSIProxyIntegrationTests {
28-
Write-Output "Running integration tests"
29-
.\integrationtests.test.exe --test.v --test.run TestAPIGroups
30-
.\integrationtests.test.exe --test.v --test.run TestDiskAPIGroup
31-
.\integrationtests.test.exe --test.v --test.run TestVolumeAPIs
32-
.\integrationtests.test.exe --test.v --test.run TestSmbAPIGroup
33-
.\integrationtests.test.exe --test.v --test.run TestFilesystemAPIGroup
28+
param (
29+
[string]$test_args = ""
30+
)
31+
32+
$ErrorActionPreference = "Stop";
33+
Write-Output "Running integration tests with test_args=$test_args";
34+
$flags = $test_args.Split(" ");
35+
.\integrationtests.test.exe @flags
36+
37+
if (-not $?) {
38+
throw "failed to run with exit code=$?"
39+
}
3440
}

scripts/utils.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,17 @@ restart_csi_proxy() {
5050

5151
run_csi_proxy_integration_tests() {
5252
echo "Run integration tests"
53-
gcloud compute ssh $windows_node --command="powershell -c \"& { Import-Module .\utils.psm1; Run-CSIProxyIntegrationTests }\""
53+
local ps1=$(cat << 'EOF'
54+
"& {
55+
Import-Module .\\utils.psm1;
56+
Run-CSIProxyIntegrationTests -test_args \"--test.v --test.run TestAPIGroups\";
57+
Run-CSIProxyIntegrationTests -test_args \"--test.v --test.run TestFilesystemAPIGroup\";
58+
Run-CSIProxyIntegrationTests -test_args \"--test.v --test.run TestDiskAPIGroup\";
59+
Run-CSIProxyIntegrationTests -test_args \"--test.v --test.run TestVolumeAPIs\";
60+
Run-CSIProxyIntegrationTests -test_args \"--test.v --test.run TestSmbAPIGroup\";
61+
}"
62+
EOF
63+
);
64+
65+
gcloud compute ssh $windows_node --command="powershell -c $(echo $ps1 | tr '\n' ' ')"
5466
}

0 commit comments

Comments
 (0)