Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

[WIP] Fix Sample Files that are failing Validation Tests #148

Open
wants to merge 31 commits into
base: dev
Choose a base branch
from

Conversation

X-Guardian
Copy link
Contributor

@X-Guardian X-Guardian commented Apr 30, 2019

Pull Request (PR) description

This PR fixes the sample files that are failing the Common Tests - Validate Example Files opt-in meta-test

This Pull Request (PR) fixes the following issues

None

Task list

  • Added an entry under the Unreleased section of the change log in the README.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 Apr 30, 2019

Codecov Report

Merging #148 into dev will decrease coverage by 2%.
The diff coverage is n/a.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #148   +/-   ##
===================================
- Coverage    83%    80%   -3%     
===================================
  Files        19     19           
  Lines      2760   2760           
  Branches      4      4           
===================================
- Hits       2303   2234   -69     
- Misses      453    522   +69     
  Partials      4      4

- Rename PasswordCredential for opt-in tests
- Add Mandatory parameter and ValidateNotNullorEmpty
- Add Node localhost
- Fix formatting
- Remove configuration call
- Fix formatting
- Add Node localhost
- Add ValidateNotNullOrEmpty to mandatory parameters
- Add Node localhost
- Remove configuration call
- Fix formatting
- Rename incorrect resource name
X-Guardian and others added 17 commits May 24, 2019 21:47
* Test-Is NanoServer speed improvement

Replace Get-ComputerInfo with Registry Value Test

* update README.md

* Add check for ServerLevels Reg Key for Non-Server

* Update CommonResourceHelper.Tests

* Moved comment to unreleased

* Make requested changes

* Remove whitespace

* README.md markdownlint fixes

* README markdownlint fix

* README branch detail format change

To match other DSC modules

* Update README

* Fix Example dir BOM files

* Fix Tests\Integration dir BOM files

* Fix Tests\Unit dir BOM files

* Fix PSDscResources dir BOM files

* Fix Tests\TestHelpers dir BOM files

* Add Script & Module Common Tests to MetaTestOptIn

* Update README

* Revert "Fix msi package tests"

* Fix MsiPackage tests... for real this time

* Fix MsiPackage tests... for real this time

* Fix MsiPackage tests... for real this time - Post Review #1

* Fix MsiPackage tests... for real this time - Post Review #1

* Update CommonResourceHelper.psm1

* Update README

* Update README.md

* Update README.md
- Rename PasswordCredential for opt-in tests
- Add Mandatory parameter and ValidateNotNullorEmpty
- Add Node localhost
- Fix formatting
- Remove configuration call
- Fix formatting
- Add Node localhost
- Add ValidateNotNullOrEmpty to mandatory parameters
- Add Node localhost
- Remove configuration call
- Fix formatting
- Rename incorrect resource name
…urces into Example-Fix

# Conflicts:
#	Examples/Sample_User_Generic.ps1
@X-Guardian X-Guardian changed the base branch from dev to master June 3, 2019 21:14
@X-Guardian X-Guardian changed the base branch from master to dev June 3, 2019 21:14
@X-Guardian
Copy link
Contributor Author

Hi @mhendric, I can't get this PR to pass its Appveyor build.

Its failing with the following error:

Executing script C:\projects\psdscresources\Tests\Unit\ResourceSetHelper.Tests.ps1
  [-] Error occurred in test script 'C:\projects\psdscresources\Tests\Unit\ResourceSetHelper.Tests.ps1' 0ms
    RuntimeException: Multiple Script modules named 'ResourceSetHelper' are currently loaded.  Make sure to remove any extra copies of the module from your session before testing.
    at Get-ScriptModule, C:\Program Files\WindowsPowerShell\Modules\Pester\4.8.1\Functions\InModuleScope.ps1: line 11

I tried putting some code in to remove the module before loading it, but it made no difference. The test runs fine locally. Any ideas?

@mhendric
Copy link
Contributor

mhendric commented Jun 3, 2019

Hey @X-Guardian , can you try completely reverting the changes that were made in ResourceSetHelper.Tests.ps1 and see if it makes a difference? The state of the code as is definitely looks odd to me with the new commented out code. Want to see if it fails even if no changes are made. Thanks.

@PlagueHO PlagueHO added 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 Oct 4, 2019
@X-Guardian
Copy link
Contributor Author

Still failing the Appveyor tests with the same error:

Multiple Script modules named 'ResourceSetHelper' are currently loaded.  Make sure to remove any extra copies of the module from your session before testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants