From 39e317a1b65a6387361810a1df31a09de851ba88 Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Mon, 24 May 2021 21:38:12 +0300 Subject: [PATCH] [ubuntu] Change Add-AssertionOperator to Add-ShouldOperator (#3445) --- images/linux/scripts/helpers/Tests.Helpers.psm1 | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/images/linux/scripts/helpers/Tests.Helpers.psm1 b/images/linux/scripts/helpers/Tests.Helpers.psm1 index c0e2c270ed67..085aaa07908d 100644 --- a/images/linux/scripts/helpers/Tests.Helpers.psm1 +++ b/images/linux/scripts/helpers/Tests.Helpers.psm1 @@ -67,10 +67,6 @@ function ShouldReturnZeroExitCode { } } -If (Get-Command -Name Add-AssertionOperator -ErrorAction SilentlyContinue) { - Add-AssertionOperator -Name ReturnZeroExitCode -InternalName ShouldReturnZeroExitCode -Test ${function:ShouldReturnZeroExitCode} -} - function ShouldMatchCommandOutput { Param( [String] $ActualValue, @@ -102,7 +98,7 @@ function ShouldMatchCommandOutput { } } -If (Get-Command -Name Add-AssertionOperator -ErrorAction SilentlyContinue) { - Add-AssertionOperator -Name ReturnZeroExitCode -InternalName ShouldReturnZeroExitCode -Test ${function:ShouldReturnZeroExitCode} - Add-AssertionOperator -Name MatchCommandOutput -InternalName ShouldMatchCommandOutput -Test ${function:ShouldMatchCommandOutput} -} \ No newline at end of file +If (Get-Command -Name Add-ShouldOperator -ErrorAction SilentlyContinue) { + Add-ShouldOperator -Name ReturnZeroExitCode -InternalName ShouldReturnZeroExitCode -Test ${function:ShouldReturnZeroExitCode} + Add-ShouldOperator -Name MatchCommandOutput -InternalName ShouldMatchCommandOutput -Test ${function:ShouldMatchCommandOutput} +}