Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable set and test for Import resources #464

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

SteveL-MSFT
Copy link
Member

PR Summary

This follows the PR to support Import kind resources by enabling set and test. As part of this change, the output for group resources should also address #266. Note that test is not complete yet as the engine currently just uses the input config as the desired state, but even after initial resolving of the include, that config still needs to have expressions invoked and parameters resolved for a valid comparison. That work will be addressed later.

As part of this change, the set group result and test group result now align with get which changes the schema.

A helper function was added for test to recursively determine if in desired state by looking for inDesiredState property and if any are false than not in desired state (I think this might address #284)

PR Context

Fix #266

@SteveL-MSFT SteveL-MSFT added Doc-Impact Schema-Impact Change requires updating a canonical schema for configs or manifests labels Jun 17, 2024
@SteveL-MSFT SteveL-MSFT requested review from anmenaga and tgauth June 17, 2024 20:01
- name: nested
type: Microsoft.DSC/Include
properties:
configurationFile: "[concat('$echoConfigPathParent', '$directorySeparator', '$echoConfigPathLeaf')]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why using concat instead of using just full path, aka $echoConfigPath ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was to test that expressions get resolved for Include

@@ -183,4 +174,38 @@ resources:
$out.results[1].result[0].result[0].type | Should -Be 'Test/Echo'
$out.results[1].result[0].result[0].result[0].actualState.output | Should -Be 'one'
}

It 'Set with include works' {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a test for test operation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be added once test is complete

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Jun 18, 2024
Merged via the queue into PowerShell:main with commit f0ffdf4 Jun 18, 2024
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the include-set-test branch June 18, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doc-Impact Schema-Impact Change requires updating a canonical schema for configs or manifests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make output for group and provider resources in dsc config * more readable
2 participants