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 18, 2020
1 parent 74bbcc0 commit 8408fcd
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 @@ -1363,6 +1363,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 @@ -1402,6 +1407,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 8408fcd

Please sign in to comment.