2023-09-01 09:08:49 +00:00
|
|
|
package s3
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "embed"
|
|
|
|
"encoding/json"
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
|
|
|
//go:embed resources/tests-struct.json
|
|
|
|
var testStructData []byte
|
|
|
|
|
|
|
|
type TestsStructure struct {
|
|
|
|
Groups []Group `json:"groups"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Group struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
Tag string `json:"tag"`
|
|
|
|
Skip bool `json:"skip"`
|
|
|
|
Comment string `json:"comment"`
|
|
|
|
Tests []string `json:"tests"`
|
2024-10-09 14:21:21 +00:00
|
|
|
Include []string `json:"include"`
|
2023-09-01 09:08:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func ParseTestsStruct() (TestsStructure, error) {
|
|
|
|
var testStruct TestsStructure
|
|
|
|
if err := json.Unmarshal(testStructData, &testStruct); err != nil {
|
|
|
|
return TestsStructure{}, fmt.Errorf("failed to parse tests struct: %w", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
return testStruct, nil
|
|
|
|
}
|