Skip to content

Commit 329a891

Browse files
test: add pwsh integration test (#6724)
* adding pwsh tests * chore(cmd): rm template Signed-off-by: Dwi Siswanto <[email protected]> --------- Signed-off-by: Dwi Siswanto <[email protected]> Co-authored-by: Dwi Siswanto <[email protected]>
1 parent c8c9967 commit 329a891

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

cmd/integration-test/code.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var codeTestCases = []TestCaseInfo{
2626
{Path: "protocols/code/pre-condition.yaml", TestCase: &codePreCondition{}, DisableOn: isCodeDisabled},
2727
{Path: "protocols/code/sh-virtual.yaml", TestCase: &codeSnippet{}, DisableOn: func() bool { return !osutils.IsLinux() || isCodeDisabled() }},
2828
{Path: "protocols/code/py-virtual.yaml", TestCase: &codeSnippet{}, DisableOn: func() bool { return !osutils.IsLinux() || isCodeDisabled() }},
29+
{Path: "protocols/code/pwsh-echo.yaml", TestCase: &codeSnippet{}, DisableOn: func() bool { return isCodeDisabled() }},
2930
}
3031

3132
const (
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
id: pw-echo
2+
3+
info:
4+
name: PowerShell Echo Test
5+
author: pdteam
6+
severity: info
7+
description: Tests PowerShell execution with an echo-like operation.
8+
tags: test,powershell,echo
9+
10+
self-contained: true
11+
12+
code:
13+
- engine:
14+
- pwsh
15+
- powershell
16+
- powershell.exe
17+
args:
18+
- -ExecutionPolicy
19+
- Bypass
20+
pattern: "*.ps1"
21+
source: |
22+
Write-Output "test-output-success"
23+
24+
matchers:
25+
- type: word
26+
words:
27+
- "test-output-success"

0 commit comments

Comments
 (0)