Skip to content

Commit 0ef2983

Browse files
committed
Fix tests
1 parent c655296 commit 0ef2983

File tree

4 files changed

+328
-329
lines changed

4 files changed

+328
-329
lines changed

.vscode/launch.json

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "lldb",
9-
"request": "launch",
10-
"name": "Debug config",
11-
"program": "${workspaceFolder}/config/target/debug/config",
12-
"args": [
13-
"list",
14-
"r*"
15-
],
16-
"cwd": "${workspaceFolder}"
17-
},
18-
{
19-
"name": "(macOS) Attach",
20-
"type": "lldb",
21-
"request": "attach",
22-
"pid": "${command:pickMyProcess}",
23-
},
24-
{
25-
"name": "(Windows) Attach",
26-
"type": "cppvsdbg",
27-
"request": "attach",
28-
"processId": "${command:pickProcess}",
29-
},
30-
{
31-
"name": "Debug sshdconfig",
32-
"type": "cppvsdbg",
33-
"request": "launch",
34-
"program": "${workspaceFolder}/sshdconfig/target/debug/sshdconfig.exe",
35-
"args": ["get"],
36-
"cwd": "${workspaceFolder}"
37-
}
38-
]
39-
}
1+
// {
2+
// // Use IntelliSense to learn about possible attributes.
3+
// // Hover to view descriptions of existing attributes.
4+
// // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
// "version": "0.2.0",
6+
// "configurations": [
7+
// {
8+
// "type": "lldb",
9+
// "request": "launch",
10+
// "name": "Debug config",
11+
// "program": "${workspaceFolder}/config/target/debug/config",
12+
// "args": [
13+
// "list",
14+
// "r*"
15+
// ],
16+
// "cwd": "${workspaceFolder}"
17+
// },
18+
// {
19+
// "name": "(macOS) Attach",
20+
// "type": "lldb",
21+
// "request": "attach",
22+
// "pid": "${command:pickMyProcess}",
23+
// },
24+
// {
25+
// "name": "(Windows) Attach",
26+
// "type": "cppvsdbg",
27+
// "request": "attach",
28+
// "processId": "${command:pickProcess}",
29+
// },
30+
// {
31+
// "name": "Debug sshdconfig",
32+
// "type": "cppvsdbg",
33+
// "request": "launch",
34+
// "program": "${workspaceFolder}/sshdconfig/target/debug/sshdconfig.exe",
35+
// "args": ["get"],
36+
// "cwd": "${workspaceFolder}"
37+
// }
38+
// ]
39+
// }

dsc_lib/src/dscresources/dscresource.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ impl Invoke for DscResource {
253253
fn set(&self, desired: &str, skip_test: bool, execution_type: &ExecutionKind) -> Result<SetResult, DscError> {
254254
debug!("{}", t!("dscresources.dscresource.invokeSet", resource = self.type_name));
255255
if let Some(adapter) = &self.require_adapter {
256-
let mut configurator = self.clone().create_config_for_adapter(adapter, desired, &execution_type)?;
256+
let mut configurator = self.clone().create_config_for_adapter(adapter, desired, execution_type)?;
257257
let result = configurator.invoke_set(false)?;
258258
let SetResult::Resource(ref resource_result) = result.results[0].result else {
259259
return Err(DscError::Operation(t!("dscresources.dscresource.invokeReturnedWrongResult", operation = "set", resource = self.type_name).to_string()));

powershell-adapter/Tests/TestClassResource/0.0.1/TestClassResource.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ class TestClassResource : BaseTestClass
124124
$out = @{
125125
Name = $this.Name
126126
_metadata = @{
127-
whatIIf = "A test message from the WhatIf method of TestClassResource"
127+
whatIf = "A test message from the WhatIf method of TestClassResource"
128128
}
129129
}
130130

131-
return ($out | ConvertTo-Json -Depth 10 -Compress)
131+
return $out
132132
}
133133
}
134134

0 commit comments

Comments
 (0)