PSDscResources icon indicating copy to clipboard operation
PSDscResources copied to clipboard

[WIP] Fix Sample Files that are failing Validation Tests

Open X-Guardian opened this issue 6 years ago • 4 comments

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

X-Guardian avatar Apr 30 '19 19:04 X-Guardian

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

codecov-io avatar Apr 30 '19 20:04 codecov-io

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?

X-Guardian avatar Jun 03 '19 21:06 X-Guardian

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.

mhendric avatar Jun 03 '19 23:06 mhendric

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.

X-Guardian avatar Oct 04 '19 21:10 X-Guardian