MCPcopy
hub / github.com/operator-framework/operator-sdk / selectTests

Method selectTests

internal/scorecard/scorecard.go:161–170  ·  view source on GitHub ↗

selectTests applies an optionally passed selector expression against the configured set of tests, returning the selected tests

(stage v1alpha3.StageConfiguration)

Source from the content-addressed store, hash-verified

159// selectTests applies an optionally passed selector expression
160// against the configured set of tests, returning the selected tests
161func (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
172func (r FakeTestRunner) Initialize(ctx context.Context) error {
173 select {

Callers 3

ListMethod · 0.95
TestEmptySelectorFunction · 0.95
RunMethod · 0.95

Calls 2

StringMethod · 0.45
SetMethod · 0.45

Tested by 1

TestEmptySelectorFunction · 0.76