File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,23 @@ Describe 'Tests for the secret() function and extensions' {
144
144
type: Microsoft.DSC.Debug/Echo
145
145
properties:
146
146
output: "[parameters('myString')]"
147
+ '@
148
+ $out = dsc - l trace config get - i $configYaml 2> $TestDrive / error.log | ConvertFrom-Json
149
+ $LASTEXITCODE | Should - Be 0
150
+ $out.results.Count | Should - Be 1
151
+ $out.results [0 ].result.actualState.Output | Should - BeExactly ' Hello'
152
+ }
153
+
154
+ It ' Allows to pass in secret() through variables' {
155
+ $configYaml = @'
156
+ $schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
157
+ variables:
158
+ myString: "[secret('MySecret')]"
159
+ resources:
160
+ - name: Database Connection
161
+ type: Microsoft.DSC.Debug/Echo
162
+ properties:
163
+ output: "[variables('myString')]"
147
164
'@
148
165
$out = dsc - l trace config get - i $configYaml 2> $TestDrive / error.log | ConvertFrom-Json
149
166
$LASTEXITCODE | Should - Be 0
You can’t perform that action at this time.
0 commit comments