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' {
144144 type: Microsoft.DSC.Debug/Echo
145145 properties:
146146 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')]"
147164'@
148165 $out = dsc - l trace config get - i $configYaml 2> $TestDrive / error.log | ConvertFrom-Json
149166 $LASTEXITCODE | Should - Be 0
You can’t perform that action at this time.
0 commit comments