We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e9c8ae commit 29b9632Copy full SHA for 29b9632
dsc/tests/dsc_version.tests.ps1
@@ -0,0 +1,20 @@
1
+# Copyright (c) Microsoft Corporation.
2
+# Licensed under the MIT License.
3
+
4
+Describe 'tests for metadata versioning' {
5
+ It 'returns the correct dsc semantic version in metadata' {
6
+ $config_yaml = @"
7
+ `$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
8
+ resources:
9
+ - name: Echo
10
+ type: Microsoft.DSC.Debug/Echo
11
+ properties:
12
+ output: 'Hello, World!'
13
+"@
14
+ $out = $config_yaml | dsc config get -f - | ConvertFrom-Json
15
+ $version = $out.metadata.'Microsoft.DSC'.version -as [System.Management.Automation.SemanticVersion]
16
+ $version | Should -Not -BeNullOrEmpty
17
+ $dscVersion = (dsc --version).Split(" ")[1]
18
+ $version | Should -Be $dscVersion
19
+ }
20
+}
0 commit comments