Skip to content

Conversation

@vors
Copy link
Collaborator

@vors vors commented Jul 4, 2016

Remove direct import call, since we are leveraging auto-discovery for Pester module

Remove direct import call, since we are leveraging auto-discovery for Pester module
)

& (Get-PSOutput) -noprofile -c "Import-Module '$PSScriptRoot/src/Modules/Pester'; Invoke-Pester $Flags $Directory/$Tests"
& (Get-PSOutput) -noprofile -c "Invoke-Pester $Flags $Directory/$Tests"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why?
I added this because the Win10 version was getting imported on my Win10 dev machine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved Pester into src/Modules/Shared, so this call fails as-is. We copy pester into the output, we should import it from there.

Copy link
Member

Choose a reason for hiding this comment

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

Import-Module : The specified module 
'/home/travis/build/PowerShell/PowerShell/src/Modules/Pester' was not loaded 
because no valid module file was found in any module directory.
At line:1 char:1
+ Import-Module '/home/travis/build/PowerShell/PowerShell/src/Modules/P ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (/home/travis/bu.../Modules 
   /Pester:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm 
   ands.ImportModuleCommand

Copy link
Member

Choose a reason for hiding this comment

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

On Travis currently.

@vors
Copy link
Collaborator Author

vors commented Jul 5, 2016

I can replace it by the new path, instead of removing, but it's just postponing the work. @lzybkr @andschwa lets do something about this PR

@vors
Copy link
Collaborator Author

vors commented Jul 6, 2016

Per offline discussion with @lzybkr new proposition:

  • not include pester in the Modules (and package) at all.
  • move pester in something like vendors folder and import it from there
    cc @JamesWTruher @andschwa

@andyleejordan
Copy link
Member

@vors

move pester in something like vendors folder
I'm totally fine with this, but let's do it once and do it right. The submodule has already been moved around a fair bit 😦

@JamesWTruher we need to try the upstream package again. I know it makes some specific Windows calls, but we could potentially get PowerShell to respond with mock data or something to enable this kind of compatibility.

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.

5 participants