Skip to content

Commit cac542f

Browse files
committed
Refactor PowerShell adapter tests to use Microsoft.Windows/WindowsPowerShell instead of Microsoft.DSC/WindowsPowerShell
1 parent ec7d58c commit cac542f

File tree

7 files changed

+7
-8
lines changed

7 files changed

+7
-8
lines changed

powershell-adapter/Tests/powershellgroup.resource.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Describe 'PowerShell adapter resource tests' {
2525

2626
It 'Windows PowerShell adapter supports File resource' -Skip:(!$IsWindows){
2727

28-
$r = dsc resource list --adapter Microsoft.DSC/WindowsPowerShell
28+
$r = dsc resource list --adapter Microsoft.Windows/WindowsPowerShell
2929
$LASTEXITCODE | Should -Be 0
3030
$resources = $r | ConvertFrom-Json
3131
($resources | ? {$_.Type -eq 'PSDesiredStateConfiguration/File'}).Count | Should -Be 1

powershell-adapter/Tests/winps_reference_resource.dsc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
55
resources:
66
- name: Copy contents from one file to another
7-
type: Microsoft.DSC/WindowsPowerShell
7+
type: Microsoft.Windows/WindowsPowerShell
88
properties:
99
resources:
1010
- name: From

powershell-adapter/Tests/winps_resource.dsc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/10/config/document.json
55
resources:
66
- name: Get info from classic DSC resources
7-
type: Microsoft.DSC/WindowsPowerShell
7+
type: Microsoft.Windows/WindowsPowerShell
88
properties:
99
resources:
1010
- name: File

powershell-adapter/powershell.resource.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ switch ($Operation) {
5757

5858
# match adapter to version of powershell
5959
if ($PSVersionTable.PSVersion.Major -le 5) {
60-
$requireAdapter = 'Microsoft.DSC/WindowsPowerShell'
60+
$requireAdapter = 'Microsoft.Windows/WindowsPowerShell'
6161
}
6262
else {
6363
$requireAdapter = 'Microsoft.DSC/PowerShell'

powershell-adapter/psDscAdapter/psDscAdapter.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function Get-DscResourceObject {
151151

152152
# match adapter to version of powershell
153153
if ($PSVersionTable.PSVersion.Major -le 5) {
154-
$adapterName = 'Microsoft.DSC/WindowsPowerShell'
154+
$adapterName = 'Microsoft.Windows/WindowsPowerShell'
155155
}
156156
else {
157157
$adapterName = 'Microsoft.DSC/PowerShell'
@@ -287,7 +287,7 @@ function Get-ActualState {
287287
}
288288
'Binary' {
289289
if ($PSVersionTable.PSVersion.Major -gt 5) {
290-
$trace = @{'Debug' = 'To use a binary resource such as File, Log, or SignatureValidation, use the Microsoft.DSC/WindowsPowerShell adapter.' } | ConvertTo-Json -Compress
290+
$trace = @{'Debug' = 'To use a binary resource such as File, Log, or SignatureValidation, use the Microsoft.Windows/WindowsPowerShell adapter.' } | ConvertTo-Json -Compress
291291
$host.ui.WriteErrorLine($trace)
292292
exit 1
293293
}

powershell-adapter/windowspowershell.dsc.resource.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/bundled/resource/manifest.json",
3-
"type": "Microsoft.DSC/WindowsPowerShell",
3+
"type": "Microsoft.Windows/WindowsPowerShell",
44
"version": "0.1.0",
55
"kind": "Adapter",
66
"description": "Resource adapter to classic DSC Powershell resources in Windows PowerShell.",

powershell-adapter/~/.config/powershell/Microsoft.PowerShell_profile.ps1

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)