File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright (c) Microsoft Corporation.
2+ # Licensed under the MIT License.
3+
4+ BeforeDiscovery {
5+ $foundBicep = if ($null -ne (Get-Command bicep - ErrorAction Ignore)) {
6+ $true
7+ } else {
8+ $false
9+ }
10+ }
11+
12+ Describe ' Bicep extension tests' - Skip:(! $foundBicep ) {
13+ It ' Example bicep file should work' {
14+ $bicepFile = Resolve-Path - Path " $PSScriptRoot \..\..\dsc\examples\hello_world.dsc.bicep"
15+ $out = dsc - l debug config get -f $bicepFile 2> $TestDrive / error.log | ConvertFrom-Json
16+ $LASTEXITCODE | Should - Be 0 - Because (Get-Content - Path $TestDrive / error.log - Raw | Out-String )
17+ $out.results [0 ].result.actualState.output | Should - BeExactly ' Hello, world!'
18+ (Get-Content - Path $TestDrive / error.log - Raw) | Should -Match " Importing file '$bicepFile ' with extension 'Microsoft.DSC.Extension/Bicep'"
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments