Skip to content

Commit

Permalink
Minor UT fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardWolosky committed Jul 19, 2020
1 parent 39a0726 commit 849e943
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tests/GitHubGists.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ try
}

AfterAll {
Remove-Item -Path $tempPath -Recurse -ErrorAction SilentlyContinue -Force
if (Get-Variable -Name tempPath -ErrorAction SilentlyContinue)
{
Remove-Item -Path $tempPath -Recurse -ErrorAction SilentlyContinue -Force
}
}

Context 'Download gist content' {
Expand Down
10 changes: 10 additions & 0 deletions Tests/GitHubRepositories.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,11 @@ try
Describe 'GitHubRepositories\Disable-GitHubRepositoryVulnerabilityAlert' {
BeforeAll {
$repo = New-GitHubRepository -RepositoryName ([Guid]::NewGuid().Guid)

# The CI build has been unreliable with this test.
# Adding a short sleep to ensure successive queries reflect updated state.
Start-Sleep -Seconds $script:defaultSleepSecondsForReliability

Enable-GitHubRepositoryVulnerabilityAlert -Uri $repo.svn_url
}

Expand Down Expand Up @@ -1306,6 +1311,11 @@ try
Describe 'GitHubRepositories\Disable-GitHubRepositorySecurityFix' {
BeforeAll {
$repo = New-GitHubRepository -RepositoryName ([Guid]::NewGuid().Guid)

# The CI build has been unreliable with this test.
# Adding a short sleep to ensure successive queries reflect updated state.
Start-Sleep -Seconds $script:defaultSleepSecondsForReliability

Enable-GitHubRepositorySecurityFix -Uri $repo.svn_url
}

Expand Down

0 comments on commit 849e943

Please sign in to comment.