selectTests applies an optionally passed selector expression against the configured set of tests, returning the selected tests
(stage v1alpha3.StageConfiguration)
| 159 | // selectTests applies an optionally passed selector expression |
| 160 | // against the configured set of tests, returning the selected tests |
| 161 | func (o *Scorecard) selectTests(stage v1alpha3.StageConfiguration) []v1alpha3.TestConfiguration { |
| 162 | selected := make([]v1alpha3.TestConfiguration, 0) |
| 163 | for _, test := range stage.Tests { |
| 164 | if o.Selector == nil || o.Selector.String() == "" || o.Selector.Matches(labels.Set(test.Labels)) { |
| 165 | // TODO olm manifests check |
| 166 | selected = append(selected, test) |
| 167 | } |
| 168 | } |
| 169 | return selected |
| 170 | } |
| 171 | |
| 172 | func (r FakeTestRunner) Initialize(ctx context.Context) error { |
| 173 | select { |