Skip to content

Commit 894d88d

Browse files
authored
Merge pull request #634 from SteveL-MSFT/reference-raw
Change `reference()` to use the raw output of a resource
2 parents 92a40d9 + dcd6929 commit 894d88d

File tree

21 files changed

+1543
-1353
lines changed

21 files changed

+1543
-1353
lines changed

dsc/Cargo.lock

Lines changed: 276 additions & 337 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dsc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ crossterm = { version = "0.28" }
1717
ctrlc = { version = "3.4" }
1818
dsc_lib = { path = "../dsc_lib" }
1919
indicatif = { version = "0.17" }
20-
jsonschema = { version = "0.26", default-features = false }
20+
jsonschema = { version = "0.28", default-features = false }
2121
path-absolutize = { version = "3.1" }
2222
rust-i18n = { version = "3" }
2323
schemars = { version = "0.8" }

dsc/examples/reference.dsc.yaml

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

dsc/tests/dsc_reference.tests.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
# Licensed under the MIT License.
33

44
Describe 'Tests for config using reference function' {
5-
It 'Reference works' {
6-
$out = dsc config get -f $PSScriptRoot/../examples/reference.dsc.yaml | ConvertFrom-Json
5+
It 'Reference works for <operation>' -TestCases @(
6+
@{ operation = 'get' },
7+
@{ operation = 'test' }
8+
) {
9+
param($operation)
10+
11+
$out = dsc config $operation -f $PSScriptRoot/../examples/reference.dsc.yaml | ConvertFrom-Json
712
$LASTEXITCODE | Should -Be 0
813
$os = if ($IsWindows) {
914
'Windows'

0 commit comments

Comments
 (0)