(t *testing.T, testSuite *test.Suite)
| 879 | } |
| 880 | |
| 881 | func (tr *TestRunner) createTestsFromYAML(t *testing.T, testSuite *test.Suite) ([]*Test, error) { |
| 882 | var tests []*Test |
| 883 | for _, section := range testSuite.Sections { |
| 884 | for _, testCase := range section.Tests { |
| 885 | testName := fmt.Sprintf("%s/%s", section.Name, testCase.Name) |
| 886 | testInput, err := tr.createTestInput(t, testCase) |
| 887 | if err != nil { |
| 888 | return nil, err |
| 889 | } |
| 890 | testResultMatcher, err := tr.createResultMatcher(t, testCase.Output) |
| 891 | if err != nil { |
| 892 | return nil, err |
| 893 | } |
| 894 | tests = append(tests, NewTest(testName, testInput, testResultMatcher)) |
| 895 | } |
| 896 | } |
| 897 | return tests, nil |
| 898 | } |
| 899 | |
| 900 | func (tr *TestRunner) createTestInput(t *testing.T, testCase *test.Case) (cel.PartialActivation, error) { |
| 901 | t.Helper() |
no test coverage detected