Skip to content

Commit

Permalink
Revert "Feat: run harness tests in parallel (#669)" (#670)
Browse files Browse the repository at this point in the history
This reverts commit b33c6b1.
  • Loading branch information
GiliFaroEnv0 committed Jul 3, 2023
1 parent b33c6b1 commit e2f3f6e
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions tests/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"path"
"runtime"
"strings"
"sync"
)

const TESTS_FOLDER = "tests/integration"
Expand All @@ -25,27 +24,16 @@ func main() {
log.Println(len(testNames), " tests to run")
buildFakeTerraformRegistry()
destroyMode := os.Getenv("DESTROY_MODE")

var wg sync.WaitGroup

for _, testName := range testNames {
wg.Add(1)

go func(testName string) {
if destroyMode == "DESTROY_ONLY" {
terraformDestory(testName)
} else {
success, err := runTest(testName, destroyMode != "NO_DESTROY")
if !success {
log.Fatalln("Halting due to test failure:", err)
}
if destroyMode == "DESTROY_ONLY" {
terraformDestory(testName)
} else {
success, err := runTest(testName, destroyMode != "NO_DESTROY")
if !success {
log.Fatalln("Halting due to test failure:", err)
}

wg.Done()
}(testName)
}
}

wg.Wait()
}
func compileProvider() error {
cmd := exec.Command("go", "build")
Expand Down

0 comments on commit e2f3f6e

Please sign in to comment.