[#6] Add new 'tests' command
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
b08b08d6a0
commit
8e325c79e5
6 changed files with 562 additions and 467 deletions
|
@ -21,7 +21,8 @@ var compatibilityCmd = &cobra.Command{
|
|||
Example: `s3-tests-parser compatibility suite.csv
|
||||
s3-tests-parser compatibility suite.json --format json
|
||||
s3-tests-parser compatibility suite.json --format json --output-format md
|
||||
s3-tests-parser compatibility suite.json --format json --output-format md --output result.md`,
|
||||
s3-tests-parser compatibility suite.json --format json --output-format md --output result.md
|
||||
s3-tests-parser compatibility suite.json --format json --output-format txt --output result.txt --verbose`,
|
||||
RunE: runCompatibilityCmd,
|
||||
}
|
||||
|
||||
|
@ -149,10 +150,15 @@ func formTestResult(group s3.Group, testsMap map[string]bool) TestResult {
|
|||
var failed []string
|
||||
var passed []string
|
||||
for _, test := range group.Tests {
|
||||
if testsMap[test] {
|
||||
passed = append(passed, test)
|
||||
split := strings.Split(test, "::") // to trim test path
|
||||
if len(split) != 2 {
|
||||
continue
|
||||
}
|
||||
testName := split[1]
|
||||
if testsMap[testName] {
|
||||
passed = append(passed, testName)
|
||||
} else {
|
||||
failed = append(failed, test)
|
||||
failed = append(failed, testName)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue