Skip to content

Commit b844974

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
Change Echo test resource to Microsoft.DSC.Debug/Echo resource
1 parent 6b57f6f commit b844974

27 files changed

+471
-80
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"rust-analyzer.linkedProjects": [
33
"./dsc/Cargo.toml",
44
"./dsc_lib/Cargo.toml",
5+
"./echo/Cargo.toml",
56
"./osinfo/Cargo.toml",
67
"./registry/Cargo.toml",
78
"./runcommandonset/Cargo.toml",
@@ -21,5 +22,8 @@
2122
"schemas/2024/04/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}",
2223
"schemas/2024/04/bundled/resource/manifest.vscode.json": "**.dsc.resource.{yaml,yml}"
2324
},
24-
"sarif-viewer.connectToGithubCodeScanning": "off"
25+
"sarif-viewer.connectToGithubCodeScanning": "off",
26+
"vscode-nmake-tools.workspaceBuildDirectories": [
27+
"."
28+
]
2529
}

build.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ if ($GetPackageVersion) {
2828

2929
$filesForWindowsPackage = @(
3030
'dsc.exe',
31+
'dscecho.exe',
32+
'echo.dsc.resource.json',
3133
'assertion.dsc.resource.json',
3234
'group.dsc.resource.json',
3335
'powershell.dsc.resource.json',
@@ -45,6 +47,8 @@ $filesForWindowsPackage = @(
4547

4648
$filesForLinuxPackage = @(
4749
'dsc',
50+
'dscecho',
51+
'echo.dsc.resource.json',
4852
'assertion.dsc.resource.json',
4953
'apt.dsc.resource.json',
5054
'apt.dsc.resource.sh',
@@ -57,6 +61,8 @@ $filesForLinuxPackage = @(
5761

5862
$filesForMacPackage = @(
5963
'dsc',
64+
'dscecho',
65+
'echo.dsc.resource.json',
6066
'assertion.dsc.resource.json',
6167
'brew.dsc.resource.json',
6268
'brew.dsc.resource.sh',
@@ -209,6 +215,7 @@ if (!$SkipBuild) {
209215
"security_context_lib",
210216
"dsc_lib",
211217
"dsc",
218+
"dscecho",
212219
"osinfo",
213220
"powershell-adapter",
214221
"process",

dsc/examples/groups.dsc.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resources:
1010
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
1111
resources:
1212
- name: Last
13-
type: Test/Echo
13+
type: Microsoft.DSC.Debug/Echo
1414
properties:
1515
output: Last
1616
dependsOn:
@@ -21,7 +21,7 @@ resources:
2121
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
2222
resources:
2323
- name: First
24-
type: Test/Echo
24+
type: Microsoft.DSC.Debug/Echo
2525
properties:
2626
output: First
2727
- name: Nested Group
@@ -30,12 +30,12 @@ resources:
3030
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
3131
resources:
3232
- name: Nested Second
33-
type: Test/Echo
33+
type: Microsoft.DSC.Debug/Echo
3434
properties:
3535
output: Nested Second
3636
dependsOn:
37-
- "[resourceId('Test/Echo','Nested First')]"
37+
- "[resourceId('Microsoft.DSC.Debug/Echo','Nested First')]"
3838
- name: Nested First
39-
type: Test/Echo
39+
type: Microsoft.DSC.Debug/Echo
4040
properties:
4141
output: Nested First

dsc/examples/multiline.dsc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
22
resources:
33
- name: test multi-line
4-
type: Test/Echo
4+
type: Microsoft.DSC.Debug/Echo
55
properties:
66
output: |
77
This is a
88
'multi-line'
99
string.
1010
- name: test single-quote escaping
11-
type: Test/Echo
11+
type: Microsoft.DSC.Debug/Echo
1212
properties:
1313
output: "[concat('This is a single-quote: ', '''')]"

dsc/examples/osinfo_parameters.dsc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ resources:
1818
properties:
1919
family: macOS
2020
- name: path
21-
type: Test/Echo
21+
type: Microsoft.DSC.Debug/Echo
2222
properties:
2323
output: "[envvar('PATH')]"

dsc/examples/reference.dsc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resources:
55
type: Microsoft/OSInfo
66
properties: {}
77
- name: Echo
8-
type: Test/Echo
8+
type: Microsoft.DSC.Debug/Echo
99
properties:
1010
output: "[concat('The OS is ', reference(resourceId('Microsoft/OSInfo','os')).actualState.family)]"
1111
dependsOn:

dsc/examples/secure_parameters.dsc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ parameters:
66
type: secureObject
77
resources:
88
- name: Echo 1
9-
type: Test/Echo
9+
type: Microsoft.DSC.Debug/Echo
1010
properties:
1111
output: "[parameters('myString')]"
1212
- name: Echo 2
13-
type: Test/Echo
13+
type: Microsoft.DSC.Debug/Echo
1414
properties:
1515
output: "[parameters('myObject').myProperty]"

dsc/examples/variables.dsc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ variables:
1010
test: baz
1111
resources:
1212
- name: test
13-
type: Test/Echo
13+
type: Microsoft.DSC.Debug/Echo
1414
properties:
1515
output: "[concat('myOutput is: ', variables('myOutput'), ', myObject is: ', variables('myObject').test)]"

dsc/tests/dsc_args.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Describe 'config argument tests' {
6565
'@ }
6666
) {
6767
param($text)
68-
$output = $text | dsc resource get -r Test/Echo
68+
$output = $text | dsc resource get -r Microsoft.DSC.Debug/Echo
6969
$output = $output | ConvertFrom-Json
7070
$output.actualState.output | Should -BeExactly 'Hello There'
7171
}

dsc/tests/dsc_config_get.tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ Describe 'dsc config get tests' {
3737
`$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
3838
resources:
3939
- name: Echo
40-
type: test/echo
40+
type: Microsoft.DSC.Debug/Echo
4141
properties:
4242
output: hello
4343
"@
4444
$result = $config_yaml | dsc config get --format pretty-json | ConvertFrom-Json
4545
$result.hadErrors | Should -BeFalse
4646
$result.results.Count | Should -Be 1
4747
$result.results[0].Name | Should -Be 'Echo'
48-
$result.results[0].type | Should -BeExactly 'test/echo'
48+
$result.results[0].type | Should -BeExactly 'Microsoft.DSC.Debug/Echo'
4949
$result.results[0].result.actualState.output | Should -Be 'hello'
5050
$result.metadata.'Microsoft.DSC'.version | Should -BeLike '3.*'
5151
$result.metadata.'Microsoft.DSC'.operation | Should -BeExactly 'Get'

0 commit comments

Comments
 (0)