Jameswtruher/travisdaily2 (#2842)

* Assign $ProgressPreference = "SilentlyContinue" to reduce output size

Travis is still complaining that the log file is too big, eliminating progress is
another step to reducing output. It's also not needed for our CI environment.

* Removed white space at end of lines

* fix misplacement of progress preference setting

also fix up trailing whitespace
This commit is contained in:
James Truher [MSFT]
2016-12-06 13:58:57 -08:00
committed by Travis Plunk
parent 2fe10558a2
commit 9aa693dfb3
4 changed files with 82 additions and 14 deletions
@@ -18,32 +18,36 @@ $InternalSource = 'OneGetTestSource'
Describe "PackageManagement Acceptance Test" -Tags "Feature" {
BeforeAll{
Register-PackageSource -Name Nugettest -provider NuGet -Location https://www.nuget.org/api/v2 -force
Register-PackageSource -Name $InternalSource -Location $InternalGallery -ProviderName 'PowerShellGet' -Trusted -ErrorAction SilentlyContinue
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
It "get-packageprovider" {
$gpp = Get-PackageProvider
$gpp | ?{ $_.name -eq "NuGet" } | should not BeNullOrEmpty
$gpp | ?{ $_.name -eq "PowerShellGet" } | should not BeNullOrEmpty
$gpp | ?{ $_.name -eq "PowerShellGet" } | should not BeNullOrEmpty
}
It "find-packageprovider PowerShellGet" {
$fpp = (Find-PackageProvider -Name "PowerShellGet" -force).name
$fpp = (Find-PackageProvider -Name "PowerShellGet" -force).name
$fpp -contains "PowerShellGet" | should be $true
}
It "install-packageprovider, Expect succeed" {
$ipp = (install-PackageProvider -name gistprovider -force -source $InternalSource -Scope CurrentUser).name
$ipp -contains "gistprovider" | should be $true
$ipp = (install-PackageProvider -name gistprovider -force -source $InternalSource -Scope CurrentUser).name
$ipp -contains "gistprovider" | should be $true
}
it "Find-package" {
$f = Find-Package -ProviderName NuGet -Name jquery -source Nugettest
@@ -51,7 +55,7 @@ Describe "PackageManagement Acceptance Test" -Tags "Feature" {
}
it "Install-package" {
$i = install-Package -ProviderName NuGet -Name jquery -force -source Nugettest -Scope CurrentUser
$i = install-Package -ProviderName NuGet -Name jquery -force -source Nugettest -Scope CurrentUser
$i.Name -contains "jquery" | should be $true
}
@@ -8,6 +8,8 @@
# (when calling get-help -online) might not matched the one in the csv file.
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
# Enable the test hook
[system.management.automation.internal.internaltesthooks]::SetTestHook('BypassOnlineHelpRetrieval', $true)
@@ -24,6 +26,7 @@
# Disable the test hook
[system.management.automation.internal.internaltesthooks]::SetTestHook('BypassOnlineHelpRetrieval', $false)
$ProgressPreference = $SavedProgressPreference
}
foreach ($filePath in @("$PSScriptRoot\assets\HelpURI\V2Cmdlets.csv", "$PSScriptRoot\assets\HelpURI\V3Cmdlets.csv"))
@@ -63,17 +63,33 @@ function RunTestCase
}
Describe "Validate that get-help <cmdletName> works" -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunTestCase -tag "CI"
}
Describe "Validate Get-Help for all cmdlets in 'Microsoft.PowerShell.Core'" -Tags @('Feature', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunTestCase -tag "Feature"
}
Describe "Validate that Get-Help returns provider-specific help" -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
$namespaces = @{
command = 'http://schemas.microsoft.com/maml/dev/command/2004/10'
dev = 'http://schemas.microsoft.com/maml/dev/2004/10'
@@ -119,6 +135,9 @@ Describe "Validate that Get-Help returns provider-specific help" -Tags @('CI', '
UpdateHelpFromLocalContentPath -ModuleName 'Microsoft.PowerShell.Core' -Tag 'CI'
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
It -Skip:(-not $IsWindows) "shows contextual help when Get-Help is invoked for provider-specific path (Get-Help -Name <verb>-<noun> -Path <path>)" -TestCases $testCases {
param($helpFile, $path, $helpContext, $verb, $noun)
@@ -41,7 +41,7 @@ $testCases = @{
}
<#
This scenario is broken due to issue # https://github.com/PowerShell/platyPS/issues/241
This scenario is broken due to issue # https://github.com/PowerShell/platyPS/issues/241
Re-enable when issue is fixed.
"Microsoft.PowerShell.Archive" = @{
HelpFiles = "Microsoft.PowerShell.Archive.psm1-help.xml"
@@ -141,7 +141,7 @@ function GetFiles
[ValidateNotNullOrEmpty()]
[string]$path
)
Get-ChildItem $path -Include $fileType -Recurse -ea SilentlyContinue | Select-Object -ExpandProperty FullName
}
@@ -275,29 +275,71 @@ function ValidateSaveHelp
}
Describe "Validate Update-Help from the Web for one PowerShell Core module." -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunUpdateHelpTests -tag "CI" -Pending
}
Describe "Validate Update-Help from the Web for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunUpdateHelpTests -tag "Feature"
}
Describe "Validate Update-Help -SourcePath for one PowerShell Core module." -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunUpdateHelpTests -tag "CI" -useSourcePath
}
Describe "Validate Update-Help -SourcePath for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunUpdateHelpTests -tag "Feature" -useSourcePath
}
Describe "Validate 'Save-Help -DestinationPath for one PowerShell Core modules." -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunSaveHelpTests -tag "CI" -Pending
}
Describe "Validate 'Save-Help -DestinationPath for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows') {
BeforeAll {
$SavedProgressPreference = $ProgressPreference
$ProgressPreference = "SilentlyContinue"
}
AfterAll {
$ProgressPreference = $SavedProgressPreference
}
RunSaveHelpTests -tag "Feature"
}