Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
fix Connect-To bug (#41)
Browse files Browse the repository at this point in the history
* replace internal coverage tools with PSCoverage (#39)

* use PSCoverage instead of internal module

* remove internal pscoverage ref

* remove deprecated and internal coverage module

* fix dependency test for conection types without deps

* - tests should return true for missing deps (fixes #40)

* remove pre release counter

* change prerelease tag
  • Loading branch information
OCram85 authored Mar 15, 2019
1 parent dbf53b7 commit 5a68527
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 184 deletions.
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ image: Visual Studio 2017

install:
- ps: Import-Module .\tools\AppVeyor.psm1
- ps: Import-Module .\tools\CoverallsIO.psm1
- ps: Invoke-InstallDependencies

environment:
Expand Down
2 changes: 1 addition & 1 deletion src/PSCredentialStore.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
ReleaseNotes = 'This is a pre-release version!. Do not use in production!'

# Prerelease string of this module
Prerelease = 'alpha1'
Prerelease = 'preview'

# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
Expand Down
5 changes: 5 additions & 0 deletions src/Private/Resolve-Dependency.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ function Resolve-Dependency {

process {
$SelectedDependency = $Dependency.Optional | Where-Object {$_.Name -match $Name}
# return true if there is no dependency defined
if ($null -eq $SelectedDependency) {
return $true
}

$res = @()
foreach ($Module in $SelectedDependency.Modules) {
$res += Test-Module -Name $Module
Expand Down
4 changes: 2 additions & 2 deletions tests/Private/01_Resolve-Dependency.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Describe "Resolve-Dependency" {
{ Resolve-Dependency -Name 'awesome'} | Should -Not -Throw
}

It "Missing dependency file should return false" {
Resolve-Dependency -Name 'awesome' | Should -Be $false
It "Missing dependency file should return true" {
Resolve-Dependency -Name 'awesome' | Should -Be $true
}
}
Context "Testing input variations" {
Expand Down
4 changes: 2 additions & 2 deletions tools/AppVeyor.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Function Invoke-InstallDependencies() {
Import-PackageProvider -Name NuGet -RequiredVersion '2.8.5.208' -Force
Install-Module -Name 'Pester' -Scope CurrentUser -RequiredVersion '4.4.2' -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name 'posh-git' -Scope CurrentUser -RequiredVersion '1.0.0-beta2' -Force -SkipPublisherCheck -AllowClobber -AllowPrerelease
# Install-Module -Name 'PSCoverage' -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber
Import-Module -Name 'Pester', 'posh-git' #, 'PSCoverage'
Install-Module -Name 'PSCoverage' -Scope CurrentUser -Force -SkipPublisherCheck -AllowClobber -RequiredVersion '1.0.78'
Import-Module -Name 'Pester', 'posh-git' , 'PSCoverage'
}
Catch {
$MsgParams = @{
Expand Down
178 changes: 0 additions & 178 deletions tools/CoverallsIO.psm1

This file was deleted.

0 comments on commit 5a68527

Please sign in to comment.