Skip to content

Commit 6a71b6c

Browse files
bjompenJefajers
andauthored
Silence output from Set-AzOpsContext (#854)
* Silence output from Set-AzOpsContext * Update * Update * Update --------- Co-authored-by: Jesper Fajers <jesper@fajers.se>
1 parent b73fa79 commit 6a71b6c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/internal/functions/Set-AzOpsContext.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
if (-not $ScopeObject.Subscription) { return }
2727
if ($context.Subscription.Id -ne $ScopeObject.Subscription) {
2828
Write-AzOpsMessage -LogLevel InternalComment -LogString 'Set-AzOpsContext.Change' -LogStringValues $context.Subscription.Name, $ScopeObject.SubscriptionDisplayName, $ScopeObject.Subscription
29-
Set-AzContext -SubscriptionId $scopeObject.Subscription -WhatIf:$false
29+
$null = Set-AzContext -SubscriptionId $scopeObject.Subscription -WhatIf:$false
3030
}
3131
}
3232
}

src/tests/integration/Repository.Tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ Describe "Repository" {
11441144
$diff3 = New-TimeSpan -Start $createTime.changeTime[1] -End $createTime.changeTime[2]
11451145
$diff4 = New-TimeSpan -Start $createTime.changeTime[0] -End $createTime.changeTime[3]
11461146
# Check if time difference is within x seconds
1147-
$allowedDiff = '8'
1147+
$allowedDiff = '25'
11481148
if ($diff1.TotalSeconds -le $allowedDiff -and $diff2.TotalSeconds -le $allowedDiff -and $diff3.TotalSeconds -le $allowedDiff -and $diff4.TotalSeconds -ge $allowedDiff) {
11491149
# Time difference is within x seconds of each other
11501150
$timeTest = "good"

0 commit comments

Comments
 (0)