Skip to content

Commit beb7fed

Browse files
committed
Fix (tests): Use random password to reduce server rate limiting causing failed tests
This fixes false negatives (incorrect test failures).
1 parent a474749 commit beb7fed

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/PSSourceQuery/public/GoldSourceRcon.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Describe "GoldSourceRcon" -Tag 'Unit' {
5252
}
5353

5454
It 'Fails when rcon password is wrong' {
55-
$password = 'foo'
55+
$password = "$( Get-Random -Minimum 1 -Maximum 1000000 )"
5656
$command = 'status'
5757
$ErrorActionPreference = 'Stop'
5858
Mock Write-Verbose {}

src/PSSourceQuery/public/SourceRcon.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Describe "SourceRcon" -Tag 'Unit' {
5252
}
5353

5454
It 'Fails when rcon password is wrong' {
55-
$password = 'foo'
55+
$password = "$( Get-Random -Minimum 1 -Maximum 1000000 )"
5656
$command = 'status'
5757
$ErrorActionPreference = 'Stop'
5858
Mock Write-Verbose {}

0 commit comments

Comments
 (0)