Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,18 @@ func initializeScenario(sc *godog.ScenarioContext) {
sc.After(func(ctx context.Context, scenario *godog.Scenario, scenarioErr error) (context.Context, error) {
// Log scenario end with status - write to /dev/tty to bypass capture
if tty, err := os.OpenFile("/dev/tty", os.O_WRONLY, 0); err == nil {
// Strip the working directory prefix to show relative paths
uri := scenario.Uri
if cwd, err := os.Getwd(); err == nil {
if rel, err := filepath.Rel(cwd, uri); err == nil {
uri = rel
}
}

if scenarioErr != nil {
fmt.Fprintf(tty, "✗ FAILED: %s (%s)\n", scenario.Name, scenario.Uri)
fmt.Fprintf(tty, "✗ FAILED: %s (%s)\n", scenario.Name, uri)
} else {
fmt.Fprintf(tty, "✓ PASSED: %s (%s)\n", scenario.Name, scenario.Uri)
fmt.Fprintf(tty, "✓ PASSED: %s (%s)\n", scenario.Name, uri)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
tty.Close()
}
Expand Down
Loading