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 bbac772
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 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 Expand Up @@ -138,7 +138,7 @@ Describe "Generate-GitBranches.ps1" {

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

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

0 comments on commit bbac772

Please sign in to comment.