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

xActiveDirectory: Opt-in to "Common Tests - Validate example files" #309

Merged
merged 17 commits into from
Jun 4, 2019
Merged

xActiveDirectory: Opt-in to "Common Tests - Validate example files" #309

merged 17 commits into from
Jun 4, 2019

Conversation

X-Guardian
Copy link
Contributor

@X-Guardian X-Guardian commented Jun 2, 2019

Pull Request (PR) description

This PR opts-in to the "Common Tests - Validate example files" DSC Resource tests.

Summary of changes:

  • Add "Common Tests - Validate Example Files" to .MetaTestOptIn.json
  • Standardise test configuration naming to allow tests to run on the following resources:
    • xADDomain
    • xADDomainController
    • xADDomainDefaultPasswordPolicy
    • xADDomainTrust
    • xADForestProperties
    • xADGroup
    • xADKDSKey
    • xADManagedServiceAccount
    • xADObjectPermissionEntry
    • xADOrganizationalUnit
    • xADRecycleBin
    • xADReplicationSite
    • xADReplicationSiteLink
    • xADUser
  • Standardise naming of ConfigurationData variable to allow tests to run on the following resources:
    • XADDomain
  • Fix incorrect parameter names and values in the following resources:
    • xADForestProperties (OutputPath)
    • xADKDSKey (AllowUnsafeEffectiveTime)
  • Remove incorrect comma in xADDomainDefaultPasswordPolicy parameter list
  • Remove PSDscAllowPlainTextPassword to allows tests to run on the following resources:
    • xADDomain
  • Remove unnecessary TrustDirection parameter and configuration data from xADDomainTrust NewOneWayTrust example
  • Format all documents for layout consistency

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry under the Unreleased section in the CHANGELOG.md.
    Entry should say what was changed, and how that affects users (if applicable).
  • Resource documentation added/updated in README.md.
  • Resource parameter descriptions added/updated in README.md, schema.mof
    and comment-based help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Resource Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
  • New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

This change is Reviewable

@codecov-io
Copy link

codecov-io commented Jun 2, 2019

Codecov Report

Merging #309 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #309   +/-   ##
===================================
  Coverage    92%    92%           
===================================
  Files        20     20           
  Lines      2307   2307           
  Branches     10     10           
===================================
  Hits       2143   2143           
  Misses      154    154           
  Partials     10     10

@X-Guardian X-Guardian changed the title xActiveDirectory: Opt-in to "Common Tests - Validate example files" xActiveDirectory: Opt-in to "Common Tests - Validate example files" and "Common Tests - Validate Example Files To Be Published" Jun 2, 2019
@X-Guardian X-Guardian marked this pull request as ready for review June 2, 2019 15:27
@johlju johlju added the needs review The pull request needs a code review. label Jun 2, 2019
Copy link
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

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

Reviewed 27 of 33 files at r2, 6 of 6 files at r3.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @X-Guardian)


.MetaTestOptIn.json, line 12 at r3 (raw file):

"Common Tests - Validate Example Files To Be Published"

Since we opt-in to this. Would you mind preparing the example to be published? It can be another PR if you like. It could also be a anopther PR because maybe we should publish the examples once the module is renamed?

  • adding the PSScriptInfo block
  • adding the DESCRIPTION in the comment-based help
  • adding the #Requires statement.
  • Rename the examples filename and configuration name to be prefixed with the resource name, and suffixed with _Config.

See example here: https://github.com/PowerShell/xActiveDirectory/blob/dev/Examples/Resources/xADComputer/1-AddComputerAccount_Config.ps1

We could then opt-in for publishing by adding the deploy step:
https://github.com/PowerShell/DscResource.Tests#deploy


Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal.ps1, line 25 at r3 (raw file):

xADDomainController_AddDomainControllerToDomainMinimal_Config

This is meant to be named like this to support publishing of this example. See previous comment. Although the file name should have been changed to match.
1-xADDomainController_AddDomainControllerToDomainMinimal_Config.ps1


Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties.ps1, line 25 at r3 (raw file):

xADDomainController_AddDomainControllerToDomainAllProperties_Config

See previous comment.


Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM.ps1, line 25 at r3 (raw file):

xADDomainController_AddDomainControllerToDomainUsingIFM_Config

See previous comment.

@X-Guardian
Copy link
Contributor Author

OK, how about we remove the "Common Tests - Validate Example Files To Be Published" from this PR then, get this merged, then I'll create another PR with all the changes needed for the publishing?

@johlju
Copy link
Member

johlju commented Jun 3, 2019

@X-Guardian that works for me.

@johlju johlju added waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. and removed needs review The pull request needs a code review. labels Jun 3, 2019
@X-Guardian X-Guardian changed the title xActiveDirectory: Opt-in to "Common Tests - Validate example files" and "Common Tests - Validate Example Files To Be Published" xActiveDirectory: Opt-in to "Common Tests - Validate example files" Jun 3, 2019
Copy link
Contributor Author

@X-Guardian X-Guardian left a comment

Choose a reason for hiding this comment

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

Reviewable status: 32 of 33 files reviewed, 4 unresolved discussions (waiting on @johlju)


.MetaTestOptIn.json, line 12 at r3 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
"Common Tests - Validate Example Files To Be Published"

Since we opt-in to this. Would you mind preparing the example to be published? It can be another PR if you like. It could also be a anopther PR because maybe we should publish the examples once the module is renamed?

  • adding the PSScriptInfo block
  • adding the DESCRIPTION in the comment-based help
  • adding the #Requires statement.
  • Rename the examples filename and configuration name to be prefixed with the resource name, and suffixed with _Config.

See example here: https://github.com/PowerShell/xActiveDirectory/blob/dev/Examples/Resources/xADComputer/1-AddComputerAccount_Config.ps1

We could then opt-in for publishing by adding the deploy step:
https://github.com/PowerShell/DscResource.Tests#deploy

Agreed to implement this in a separate PR


Examples/Resources/xADDomainController/1-AddDomainControllerToDomainMinimal.ps1, line 25 at r3 (raw file):

Agreed to implement this in a separate PR


Examples/Resources/xADDomainController/2-AddDomainControllerToDomainAllProperties.ps1, line 25 at r3 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
xADDomainController_AddDomainControllerToDomainAllProperties_Config

See previous comment.

Agreed to implement this in a separate PR


Examples/Resources/xADDomainController/3-AddDomainControllerToDomainUsingIFM.ps1, line 25 at r3 (raw file):

Previously, johlju (Johan Ljunggren) wrote…
xADDomainController_AddDomainControllerToDomainUsingIFM_Config

See previous comment.

Agreed to implement this in a separate PR

@johlju johlju added needs review The pull request needs a code review. and removed waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. labels Jun 4, 2019
Copy link
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r4.
Reviewable status: 33 of 34 files reviewed, all discussions resolved

@johlju
Copy link
Member

johlju commented Jun 4, 2019

Just need a rebase and I merge this one.

@johlju johlju added waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. and removed needs review The pull request needs a code review. labels Jun 4, 2019
@X-Guardian
Copy link
Contributor Author

@johlju, can you resolve these conflicts online for me? I just get a spinning logo when I try. Otherwise it will have to wait till I get home this evening.

X-Guardian and others added 7 commits June 4, 2019 14:20
- Remove incorrect DnsDelegationCredential
- Rename ConfigurationData variable
- Add "Common Tests - Validate Example Files To Be Published"
- Remove "Common Tests - Validate Example Files To Be Published"
@johlju
Copy link
Member

johlju commented Jun 4, 2019

@X-Guardian I rebased the PR.

Copy link
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r5, 1 of 1 files at r6.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@johlju johlju removed the waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. label Jun 4, 2019
@johlju johlju merged commit c39f7ef into dsccommunity:dev Jun 4, 2019
@X-Guardian X-Guardian deleted the ValidateExampleFiles-Fix branch June 4, 2019 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xActiveDirectory: Enable the tests "Common Tests - Validate Example Files"
3 participants