Skip to content

Commit 2589b3e

Browse files
committed
Import PS Security module before running a PS function
1 parent 07be14d commit 2589b3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
integration_tests:
55
strategy:
66
matrix:
7-
go: ['1.20']
7+
go: ['1.22']
88
platform: [windows-latest]
99
runs-on: ${{ matrix.platform }}
1010
steps:
@@ -19,10 +19,10 @@ jobs:
1919
go build -v -a -o ./bin/csi-proxy.exe ./cmd/csi-proxy
2020
go build -v -a -o ./bin/csi-proxy-api-gen.exe ./cmd/csi-proxy-api-gen
2121
- name: Run Windows Integration Tests
22+
shell: powershell
2223
run: |
2324
# required for running Volume and Disk tests
2425
Install-WindowsFeature -name Hyper-V-PowerShell
25-
2626
# start the CSI Proxy before running tests on windows
2727
Start-Job -Name CSIProxy -ScriptBlock {
2828
.\bin\csi-proxy.exe
@@ -35,7 +35,7 @@ jobs:
3535
unit_tests:
3636
strategy:
3737
matrix:
38-
go: ['1.20']
38+
go: ['1.22']
3939
platform: [windows-latest]
4040
runs-on: ${{ matrix.platform }}
4141
steps:
@@ -53,7 +53,7 @@ jobs:
5353
bump_version_test:
5454
strategy:
5555
matrix:
56-
go: ['1.20']
56+
go: ['1.22']
5757
platform: [ubuntu-latest]
5858
runs-on: ${{ matrix.platform }}
5959
steps:

integrationtests/smb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func randomString(length int) string {
3030
}
3131

3232
func setupUser(username, password string) error {
33-
cmdLine := fmt.Sprintf(`$PWord = ConvertTo-SecureString $Env:password -AsPlainText -Force` +
33+
cmdLine := fmt.Sprintf(`;$PWord = ConvertTo-SecureString $Env:password -AsPlainText -Force` +
3434
`;New-Localuser -name $Env:username -accountneverexpires -password $PWord`)
3535
cmd := exec.Command("powershell", "/c", cmdLine)
3636
cmd.Env = append(os.Environ(),

0 commit comments

Comments
 (0)