deterministic order for rest unit tests.

This commit is contained in:
Raúl Kripalani 2021-06-23 17:08:46 +01:00
parent 2c605e08f1
commit f4341409a1
2 changed files with 5 additions and 1 deletions

View File

@ -842,7 +842,7 @@ workflows:
- test:
name: test-unit-rest
suite: utest-unit-rest
target: "./blockstore/... ./build/... ./journal/... ./cli/... ./conformance/... ./node/... ./paychmgr/... ./api/... ./chain/... ./lib/... ./cmd/... ./extern/... ./gateway/... ./markets/... ./storage/... ./tools/..."
target: "./api/... ./blockstore/... ./build/... ./chain/... ./cli/... ./cmd/... ./conformance/... ./extern/... ./gateway/... ./journal/... ./lib/... ./markets/... ./node/... ./paychmgr/... ./storage/... ./tools/..."
- test:
name: test-unit-storage
suite: utest-unit-storage

View File

@ -5,6 +5,7 @@ import (
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"text/template"
)
@ -100,6 +101,9 @@ func main() {
groupedUnitTests["unit-rest"] = append(groupedUnitTests["unit-rest"], k)
}
// map iteration guarantees no order, so sort the array in-place.
sort.Strings(groupedUnitTests["unit-rest"])
// form the input data.
type data struct {
ItestFiles []string