From 9a91438faf8cb2c905f0b44ec0868bc7394d8f36 Mon Sep 17 00:00:00 2001 From: Daniel Scott-Raynsford Date: Fri, 22 Feb 2019 22:26:11 +1300 Subject: [PATCH] Suppress verbose output when loading module during automated testing to reduce output --- RELEASENOTES.md | 2 ++ src/CosmosDB.psd1 | 2 ++ test/Integration/CosmosDB.integration.Tests.ps1 | 2 +- test/Unit/CosmosDB.accounts.Tests.ps1 | 2 +- test/Unit/CosmosDB.attachments.Tests.ps1 | 2 +- test/Unit/CosmosDB.collections.Tests.ps1 | 2 +- test/Unit/CosmosDB.databases.Tests.ps1 | 2 +- test/Unit/CosmosDB.documents.Tests.ps1 | 2 +- test/Unit/CosmosDB.offers.Tests.ps1 | 2 +- test/Unit/CosmosDB.permissions.Tests.ps1 | 2 +- test/Unit/CosmosDB.storedprocedures.Tests.ps1 | 2 +- test/Unit/CosmosDB.triggers.Tests.ps1 | 2 +- test/Unit/CosmosDB.userdefinedfunctions.Tests.ps1 | 2 +- test/Unit/CosmosDB.users.Tests.ps1 | 2 +- test/Unit/CosmosDB.utils.Tests.ps1 | 2 +- 15 files changed, 17 insertions(+), 13 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 15baed7f..63f3a982 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -8,6 +8,8 @@ February 22, 2018 functions - fixes [Issue #274](https://github.com/PlagueHO/CosmosDB/issues/274). - Update `cosmosdb.psdepend.psd1` to install modules `Az.Resources` 1.1.2 and `Az.Accounts` 1.3.0. +- Suppress verbose output when loading module during automated + testing to reduce output. ## What is New in CosmosDB 3.2.0.320 diff --git a/src/CosmosDB.psd1 b/src/CosmosDB.psd1 index baa4aec1..b99bad08 100644 --- a/src/CosmosDB.psd1 +++ b/src/CosmosDB.psd1 @@ -165,6 +165,8 @@ PrivateData = @{ functions - fixes [Issue #274](https://github.com/PlagueHO/CosmosDB/issues/274). - Update `cosmosdb.psdepend.psd1` to install modules `Az.Resources` 1.1.2 and `Az.Accounts` 1.3.0. + - Suppress verbose output when loading module during automated + testing to reduce output. ## What is New in CosmosDB 3.2.0.320 diff --git a/test/Integration/CosmosDB.integration.Tests.ps1 b/test/Integration/CosmosDB.integration.Tests.ps1 index 8be9fb91..19525596 100644 --- a/test/Integration/CosmosDB.integration.Tests.ps1 +++ b/test/Integration/CosmosDB.integration.Tests.ps1 @@ -8,7 +8,7 @@ $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" $TestHelperPath = "$PSScriptRoot\..\TestHelper" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false Import-Module -Name $TestHelperPath -Force Get-AzureServicePrincipal diff --git a/test/Unit/CosmosDB.accounts.Tests.ps1 b/test/Unit/CosmosDB.accounts.Tests.ps1 index 5fac3b80..2ff5ddba 100644 --- a/test/Unit/CosmosDB.accounts.Tests.ps1 +++ b/test/Unit/CosmosDB.accounts.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.attachments.Tests.ps1 b/test/Unit/CosmosDB.attachments.Tests.ps1 index 755afec9..b688b2e8 100644 --- a/test/Unit/CosmosDB.attachments.Tests.ps1 +++ b/test/Unit/CosmosDB.attachments.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.collections.Tests.ps1 b/test/Unit/CosmosDB.collections.Tests.ps1 index 3bb9610c..2276914b 100644 --- a/test/Unit/CosmosDB.collections.Tests.ps1 +++ b/test/Unit/CosmosDB.collections.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.databases.Tests.ps1 b/test/Unit/CosmosDB.databases.Tests.ps1 index 911a4852..24b08825 100644 --- a/test/Unit/CosmosDB.databases.Tests.ps1 +++ b/test/Unit/CosmosDB.databases.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.documents.Tests.ps1 b/test/Unit/CosmosDB.documents.Tests.ps1 index 1d135512..21f9e58b 100644 --- a/test/Unit/CosmosDB.documents.Tests.ps1 +++ b/test/Unit/CosmosDB.documents.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.offers.Tests.ps1 b/test/Unit/CosmosDB.offers.Tests.ps1 index 37fd073a..4b2556bb 100644 --- a/test/Unit/CosmosDB.offers.Tests.ps1 +++ b/test/Unit/CosmosDB.offers.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.permissions.Tests.ps1 b/test/Unit/CosmosDB.permissions.Tests.ps1 index 537705d5..07eede84 100644 --- a/test/Unit/CosmosDB.permissions.Tests.ps1 +++ b/test/Unit/CosmosDB.permissions.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.storedprocedures.Tests.ps1 b/test/Unit/CosmosDB.storedprocedures.Tests.ps1 index 1adfe7cf..6d861da2 100644 --- a/test/Unit/CosmosDB.storedprocedures.Tests.ps1 +++ b/test/Unit/CosmosDB.storedprocedures.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { diff --git a/test/Unit/CosmosDB.triggers.Tests.ps1 b/test/Unit/CosmosDB.triggers.Tests.ps1 index 92e7935a..f1ec1969 100644 --- a/test/Unit/CosmosDB.triggers.Tests.ps1 +++ b/test/Unit/CosmosDB.triggers.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.userdefinedfunctions.Tests.ps1 b/test/Unit/CosmosDB.userdefinedfunctions.Tests.ps1 index 74a7ab7b..e0a972fb 100644 --- a/test/Unit/CosmosDB.userdefinedfunctions.Tests.ps1 +++ b/test/Unit/CosmosDB.userdefinedfunctions.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.users.Tests.ps1 b/test/Unit/CosmosDB.users.Tests.ps1 index bd859770..3e61f5d5 100644 --- a/test/Unit/CosmosDB.users.Tests.ps1 +++ b/test/Unit/CosmosDB.users.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper" diff --git a/test/Unit/CosmosDB.utils.Tests.ps1 b/test/Unit/CosmosDB.utils.Tests.ps1 index 5421191d..5bd0ace4 100644 --- a/test/Unit/CosmosDB.utils.Tests.ps1 +++ b/test/Unit/CosmosDB.utils.Tests.ps1 @@ -6,7 +6,7 @@ param ( $ModuleManifestName = 'CosmosDB.psd1' $ModuleManifestPath = "$PSScriptRoot\..\..\src\$ModuleManifestName" -Import-Module -Name $ModuleManifestPath -Force +Import-Module -Name $ModuleManifestPath -Force -Verbose:$false InModuleScope CosmosDB { $TestHelperPath = "$PSScriptRoot\..\TestHelper"