Skip to content

Commit

Permalink
Test -Pull only on one test to speed up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Nov 27, 2023
1 parent c1bc2c1 commit 27ef8c9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Generate-GitBranches.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ Describe "Generate-GitBranches.ps1" {
}
}

It "Creates and updates branches of a same repo (dry-run) " {
It "Creates and updates branches of a same repo (dry-run)" {
$currentRef = git rev-parse --short HEAD
if ($LASTEXITCODE) { throw }
& ./Generate-GitBranches.ps1 -Repo . -Pull -ErrorAction Stop -WhatIf 6>$null # Create
& ./Generate-GitBranches.ps1 -Repo . -ErrorAction Stop -WhatIf 6>$null # Create
git checkout $currentRef
& ./Generate-GitBranches.ps1 -Repo . -Pull -ErrorAction Stop -WhatIf 6>$null # Update
& ./Generate-GitBranches.ps1 -Repo . -ErrorAction Stop -WhatIf 6>$null # Update

cd $sameRepo
$branches = git branch | % { $_.Replace('*', '').Trim() } | ? { $_ -match '^steam-' }
Expand All @@ -50,9 +50,9 @@ Describe "Generate-GitBranches.ps1" {
It "Creates and updates branches of a same repo" {
$currentRef = git rev-parse --short HEAD
if ($LASTEXITCODE) { throw }
& ./Generate-GitBranches.ps1 -Repo . -Pull -ErrorAction Stop 6>$null # Create
& ./Generate-GitBranches.ps1 -Repo . -ErrorAction Stop 6>$null # Create
git checkout $currentRef
& ./Generate-GitBranches.ps1 -Repo . -Pull -ErrorAction Stop 6>$null # Update
& ./Generate-GitBranches.ps1 -Repo . -ErrorAction Stop 6>$null # Update

cd $sameRepo
$branches = git branch | % { $_.Replace('*', '').Trim() } | ? { $_ -match '^steam-' }
Expand All @@ -72,7 +72,7 @@ Describe "Generate-GitBranches.ps1" {

It "Creates and updates branches of a same repo of (one game)" {
& $sourceRepo/Generate-GitBranches.ps1 -Repo . -GamePlatform steam -GameEngine hlds -Game valve -ErrorAction Stop 6>$null # Create
& $sourceRepo/Generate-GitBranches.ps1 -Repo . -GamePlatform steam -GameEngine hlds -Game valve -ErrorAction Stop 6>$null # Update
& $sourceRepo/Generate-GitBranches.ps1 -Repo . -GamePlatform steam -GameEngine hlds -Game valve -Pull -ErrorAction Stop 6>$null # Update

cd $sameRepo
$branches = git branch | % { $_.Replace('*', '').Trim() } | ? { $_ -match '^steam-' }
Expand Down

0 comments on commit 27ef8c9

Please sign in to comment.