(ctx context.Context, test v1alpha3.TestConfiguration)
| 143 | } |
| 144 | |
| 145 | func (o Scorecard) runTest(ctx context.Context, test v1alpha3.TestConfiguration) v1alpha3.Test { |
| 146 | result, err := o.TestRunner.RunTest(ctx, test, o.PodSecurity) |
| 147 | if err != nil { |
| 148 | result = convertErrorToStatus(err, "") |
| 149 | } |
| 150 | |
| 151 | out := v1alpha3.NewTest() |
| 152 | //TODO: Add timestamp to result when API version updates |
| 153 | //out.Tstamp = time.Now().Format(time.RFC850) |
| 154 | out.Spec = test |
| 155 | out.Status = *result |
| 156 | return out |
| 157 | } |
| 158 | |
| 159 | // selectTests applies an optionally passed selector expression |
| 160 | // against the configured set of tests, returning the selected tests |
no test coverage detected