Skip to content
Permalink
Browse files

Registering repos bug fix (#466)

  • Loading branch information...
alerickson committed Jul 1, 2019
1 parent cb0015e commit fd1cccc8a948b18f4f4c2292e3670a3e6f91d1ab
@@ -1,4 +1,7 @@
# Changelog
## 1.4.3
* Another bug fix when registering repositories with PowerShellGet

## 1.4.2
* Bug fix for passing credentials from PowerShellGet when registering repositories

@@ -53,7 +53,7 @@ configuration Sample_InstallPester
[string]$DestinationPath
)

Import-DscResource -Module PackageManagement -ModuleVersion 1.4.2
Import-DscResource -Module PackageManagement -ModuleVersion 1.4.3

Node "localhost"
{
@@ -23,7 +23,7 @@ configuration Sample_Install_Package
)


Import-DscResource -Module PackageManagement -ModuleVersion 1.4.2
Import-DscResource -Module PackageManagement -ModuleVersion 1.4.3

Node $NodeName
{
@@ -38,7 +38,7 @@ configuration Sample_Install_Package_Using_NuGet
[string]$InstallationPolicy
)

Import-DscResource -Module PackageManagement -ModuleVersion 1.4.2
Import-DscResource -Module PackageManagement -ModuleVersion 1.4.3

Node $NodeName
{
@@ -101,33 +101,26 @@ Describe "Azure Artifacts Credential Provider Integration" -Tags "Feature" {
{
$VSinstalledCredProvider = $true;
}

$secstr = ConvertTo-SecureString $PAT -AsPlainText -Force
$credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr
register-packagesource $pkgSourceName -Location $testSource -providername Nuget -Credential $credential
}

AfterAll{
UnRegister-PackageSource -Name $pkgSourceName -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
}

it "Register-PackageSource using Visual Studio installed credential provider" -Skip:(!$VSinstalledCredProvider){
register-packagesource $pkgSourceName -Location $testSource -providername Nuget

(Get-PackageSource -Name $pkgSourceName).Name | should match $pkgSourceName
(Get-PackageSource -Name $pkgSourceName).Location | should match $testSource

UnRegister-PackageSource -Name $pkgSourceName -ErrorAction SilentlyContinue -WarningAction SilentlyContinue
it "Find-Package using Visual Studio installed credential provider" -Skip:(!$VSinstalledCredProvider){
$pkg = find-package * -provider $nuget -source $pkgSourceName
$pkg.Count | should -BeGreaterThan 0
}

it "Register-PackageSource using credential provider" -Skip:(!$IsWindows){
# Make sure the credential provider is installed (works for Windows, Linux, and Mac)
# If the credential provider is already installed, will receive the message: "The netcore Credential Provider is already in C:\Users\<alias>\.nuget\plugins"
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'))

register-packagesource $pkgSourceName -Location $testSource -providername Nuget

(Get-PackageSource -Name $pkgSourceName).Name | should match $pkgSourceName
(Get-PackageSource -Name $pkgSourceName).Location | should match $testSource
}

it "Find-Package using credential provider" -Skip:(!$IsWindows){
$pkg = find-package * -provider $nuget -source $pkgSourceName
$pkg.Count | should -BeGreaterThan 0
}
@@ -20,7 +20,7 @@
CompanyName = "Microsoft Corporation"
Copyright = "(C) Microsoft Corporation. All rights reserved."
HelpInfoUri = "https://go.microsoft.com/fwlink/?linkid=855962"
ModuleVersion = "1.4.2"
ModuleVersion = "1.4.3"
PowerShellVersion = "3.0"
ClrVersion = "4.0"
RootModule = "PackageManagement.psm1"
@@ -52,6 +52,29 @@
PSData = @{
Tags = @('PackageManagement', 'PSEdition_Core', 'PSEdition_Desktop', 'Linux', 'Mac')
ProjectUri = 'https://oneget.org'
ReleaseNotes = @'
## 1.4.3
- Another bug fix when registering repositories with PowerShellGet
## 1.4.2
- Bug fix for passing credentials from PowerShellGet when registering repositories
## 1.4.1
- Bug fix for using credential provider installed in Visual Studio
## 1.4
- Allow credential persistance for registering private repositories and finding or installing packages from those repositories
## 1.3.2
- Enable bootstrap on PSCore
- Bug fix to run on .NET Core 3.0
## 1.3.1
- Targets net452 and netstandard2.0 instead of net451, netcoreapp2.0, and netstandard1.6
## Previous releases are not included in this Changelog
'@
}
}
}

0 comments on commit fd1cccc

Please sign in to comment.
You can’t perform that action at this time.