theLogOutputShouldContain checks if the log output (stderr) contains the expected text
(ctx context.Context, expected string)
| 833 | |
| 834 | // theLogOutputShouldContain checks if the log output (stderr) contains the expected text |
| 835 | func theLogOutputShouldContain(ctx context.Context, expected string) error { |
| 836 | status, err := ecStatusFrom(ctx) |
| 837 | if err != nil { |
| 838 | return err |
| 839 | } |
| 840 | |
| 841 | stderr := status.stderr.String() |
| 842 | if !strings.Contains(stderr, expected) { |
| 843 | return fmt.Errorf("expected log output to contain:\n%s\nbut stderr was:\n%s", expected, stderr) |
| 844 | } |
| 845 | |
| 846 | return nil |
| 847 | } |
| 848 | |
| 849 | // AddStepsTo adds Gherkin steps to the godog ScenarioContext |
| 850 | func AddStepsTo(sc *godog.ScenarioContext) { |
nothing calls this directly
no test coverage detected