Skip to content

Commit 67f7668

Browse files
SteveL-MSFTSteve Lee (POWERSHELL HE/HIM) (from Dev Box)
authored andcommitted
fix bicep test
1 parent 984f830 commit 67f7668

File tree

2 files changed

+58
-47
lines changed

2 files changed

+58
-47
lines changed

dscecho/echo_version_date_test.dsc.resource.json

Lines changed: 0 additions & 47 deletions
This file was deleted.

extensions/bicep/bicep.tests.ps1

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,64 @@ BeforeDiscovery {
1010
}
1111

1212
Describe 'Bicep extension tests' -Skip:(!$foundBicep) {
13+
BeforeAll {
14+
$dateVersion = @'
15+
{
16+
"$schema": "https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.json",
17+
"type": "Microsoft.DSC.Debug/Echo",
18+
"version": "2025-08-27",
19+
"description": "Echo resource for testing and debugging purposes",
20+
"get": {
21+
"executable": "dscecho",
22+
"args": [
23+
{
24+
"jsonInputArg": "--input",
25+
"mandatory": true
26+
}
27+
]
28+
},
29+
"set": {
30+
"executable": "dscecho",
31+
"args": [
32+
{
33+
"jsonInputArg": "--input",
34+
"mandatory": true
35+
}
36+
]
37+
},
38+
"test": {
39+
"executable": "dscecho",
40+
"args": [
41+
{
42+
"jsonInputArg": "--input",
43+
"mandatory": true
44+
}
45+
]
46+
},
47+
"export": {
48+
"executable": "dscecho",
49+
"args": [
50+
{
51+
"jsonInputArg": "--input",
52+
"mandatory": true
53+
}
54+
]
55+
},
56+
"schema": {
57+
"command": {
58+
"executable": "dscecho"
59+
}
60+
}
61+
}
62+
'@
63+
Set-Content -Path "$TestDrive/dateVersion.dsc.resource.json" -Value $dateVersion
64+
$env:DSC_RESOURCE_PATH = "$env:PATH" + [System.IO.Path]::PathSeparator + "$TestDrive"
65+
}
66+
67+
AfterAll {
68+
$env:DSC_RESOURCE_PATH = $null
69+
}
70+
1371
It 'Example bicep file should work' {
1472
$bicepFile = Resolve-Path -Path "$PSScriptRoot\..\..\dsc\examples\hello_world.dsc.bicep"
1573
$out = dsc -l trace config get -f $bicepFile 2>$TestDrive/error.log | ConvertFrom-Json

0 commit comments

Comments
 (0)