fix: unittest with failfast

This commit is contained in:
debugtalk
2022-04-16 00:36:38 +08:00
parent 810bce0a88
commit 98c23fbd1f
14 changed files with 154 additions and 147 deletions
+2 -1
View File
@@ -270,11 +270,12 @@ func loadFromCSV(path string) []map[string]interface{} {
log.Error().Err(err).Msg("parse csv file failed")
os.Exit(1)
}
firstLine := content[0] // parameter names
var result []map[string]interface{}
for i := 1; i < len(content); i++ {
row := make(map[string]interface{})
for j := 0; j < len(content[i]); j++ {
row[content[0][j]] = content[i][j]
row[firstLine[j]] = content[i][j]
}
result = append(result, row)
}