diff --git a/go.mod b/go.mod index f5d0dc81ce..8c8d0efd09 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/crc-org/admin-helper v0.5.2 github.com/crc-org/machine v0.0.0-20221028075518-f9b43442196b github.com/crc-org/vfkit v0.5.1 - github.com/cucumber/godog v0.13.0 + github.com/cucumber/godog v0.14.0 github.com/cucumber/messages-go/v10 v10.0.3 github.com/docker/go-units v0.5.0 github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 diff --git a/go.sum b/go.sum index ff5d13030a..6ee8b7e6ef 100644 --- a/go.sum +++ b/go.sum @@ -72,8 +72,8 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cucumber/gherkin/go/v26 v26.2.0 h1:EgIjePLWiPeslwIWmNQ3XHcypPsWAHoMCz/YEBKP4GI= github.com/cucumber/gherkin/go/v26 v26.2.0/go.mod h1:t2GAPnB8maCT4lkHL99BDCVNzCh1d7dBhCLt150Nr/0= -github.com/cucumber/godog v0.13.0 h1:KvX9kNWmAJwp882HmObGOyBbNUP5SXQ+SDLNajsuV7A= -github.com/cucumber/godog v0.13.0/go.mod h1:FX3rzIDybWABU4kuIXLZ/qtqEe1Ac5RdXmqvACJOces= +github.com/cucumber/godog v0.14.0 h1:h/K4t7XBxsFBF+UJEahNqJ1/2VHVepRXCSq3WWWnehs= +github.com/cucumber/godog v0.14.0/go.mod h1:FX3rzIDybWABU4kuIXLZ/qtqEe1Ac5RdXmqvACJOces= github.com/cucumber/messages-go/v10 v10.0.3 h1:m/9SD/K/A15WP7i1aemIv7cwvUw+viS51Ui5HBw1cdE= github.com/cucumber/messages-go/v10 v10.0.3/go.mod h1:9jMZ2Y8ZxjLY6TG2+x344nt5rXstVVDYSdS5ySfI1WY= github.com/cucumber/messages/go/v21 v21.0.1 h1:wzA0LxwjlWQYZd32VTlAVDTkW6inOFmSM+RuOwHZiMI= diff --git a/vendor/github.com/cucumber/godog/CHANGELOG.md b/vendor/github.com/cucumber/godog/CHANGELOG.md index d07188484d..a08a0da710 100644 --- a/vendor/github.com/cucumber/godog/CHANGELOG.md +++ b/vendor/github.com/cucumber/godog/CHANGELOG.md @@ -7,7 +7,9 @@ This project adheres to [Semantic Versioning](http://semver.org). This document is formatted according to the principles of [Keep A CHANGELOG](http://keepachangelog.com). ## Unreleased - +### Fixed +- Remove line overwriting for scenario outlines in cucumber formatter ([605](https://github.com/cucumber/godog/pull/605) - [glibas](https://github.com/glibas)) + ## [v0.13.0] ### Added - Support for reading feature files from an `fs.FS` ([550](https://github.com/cucumber/godog/pull/550) - [tigh-latte](https://github.com/tigh-latte)) diff --git a/vendor/github.com/cucumber/godog/internal/formatters/fmt_base.go b/vendor/github.com/cucumber/godog/internal/formatters/fmt_base.go index 2166509edd..e2dc9bad7a 100644 --- a/vendor/github.com/cucumber/godog/internal/formatters/fmt_base.go +++ b/vendor/github.com/cucumber/godog/internal/formatters/fmt_base.go @@ -106,7 +106,6 @@ func (f *Base) Summary() { switch sr.Status { case passed: - prStatus = passed passedSt++ case failed: prStatus = failed diff --git a/vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go b/vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go index 8adbfcba29..545e3fa0c6 100644 --- a/vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go +++ b/vendor/github.com/cucumber/godog/internal/formatters/fmt_cucumber.go @@ -252,10 +252,6 @@ func (f *Cuke) buildCukeStep(pickle *messages.Pickle, stepResult models.PickleSt step := feature.FindStep(pickleStep.AstNodeIds[0]) line := step.Location.Line - if len(pickle.AstNodeIds) == 2 { - _, row := feature.FindExample(pickle.AstNodeIds[1]) - line = row.Location.Line - } cukeStep.Name = pickleStep.Text cukeStep.Line = int(line) diff --git a/vendor/github.com/cucumber/godog/suite.go b/vendor/github.com/cucumber/godog/suite.go index 16bfd15e01..f6284c6a92 100644 --- a/vendor/github.com/cucumber/godog/suite.go +++ b/vendor/github.com/cucumber/godog/suite.go @@ -101,12 +101,12 @@ func (s *suite) runStep(ctx context.Context, pickle *Scenario, step *Step, scena } } - earlyReturn := scenarioErr != nil || err == ErrUndefined + earlyReturn := scenarioErr != nil || errors.Is(err, ErrUndefined) switch { case errors.Is(err, ErrPending): sr.Status = StepPending - case errors.Is(err, ErrSkip) || (err == nil && scenarioErr != nil): + case errors.Is(err, ErrSkip), err == nil && scenarioErr != nil: sr.Status = StepSkipped case errors.Is(err, ErrUndefined): sr.Status = StepUndefined @@ -130,17 +130,22 @@ func (s *suite) runStep(ctx context.Context, pickle *Scenario, step *Step, scena return } - switch err { - case nil: + switch { + case err == nil: sr.Status = models.Passed s.storage.MustInsertPickleStepResult(sr) s.fmt.Passed(pickle, step, match.GetInternalStepDefinition()) - case ErrPending: + case errors.Is(err, ErrPending): sr.Status = models.Pending s.storage.MustInsertPickleStepResult(sr) s.fmt.Pending(pickle, step, match.GetInternalStepDefinition()) + case errors.Is(err, ErrSkip): + sr.Status = models.Skipped + s.storage.MustInsertPickleStepResult(sr) + + s.fmt.Skipped(pickle, step, match.GetInternalStepDefinition()) default: sr.Status = models.Failed sr.Err = err @@ -481,11 +486,11 @@ func (s *suite) runSteps(ctx context.Context, pickle *Scenario, steps []*Step) ( } func (s *suite) shouldFail(err error) bool { - if err == nil || err == ErrSkip { + if err == nil || errors.Is(err, ErrSkip) { return false } - if err == ErrUndefined || err == ErrPending { + if errors.Is(err, ErrUndefined) || errors.Is(err, ErrPending) { return s.strict } diff --git a/vendor/modules.txt b/vendor/modules.txt index e599f085a3..7320a32d17 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -213,7 +213,7 @@ github.com/crc-org/vfkit/pkg/util # github.com/cucumber/gherkin/go/v26 v26.2.0 ## explicit; go 1.19 github.com/cucumber/gherkin/go/v26 -# github.com/cucumber/godog v0.13.0 +# github.com/cucumber/godog v0.14.0 ## explicit; go 1.16 github.com/cucumber/godog github.com/cucumber/godog/colors