You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running godog build or godog run returns an error about not being able to import godog.
Error: could not build binary at: "godog.test". reason: failed to compile tested package: /Users/jweinert/src/bdd-example, reason: exit status 1, output: WORK=/var/folders/97/77r4rn4x51s5_q1h8k16x6900000gn/T/go-build497481945
# example.com/bdd-example
godog_dependency_file_test.go:3:8: cannot find package "." in:
/Users/jweinert/src/bdd-example/vendor/github.com/cucumber/godog
FAIL example.com/bdd-example [setup failed]
Usage:
godog build [flags]
Examples:
godog build
godog build -o godog.test
Flags:
-h, --help help for build
-o, --output string compiles the test runner to the named file
(default "godog.test")
could not build binary at: "godog.test". reason: failed to compile tested package: /Users/jweinert/src/bdd-example, reason: exit status 1, output: WORK=/var/folders/97/77r4rn4x51s5_q1h8k16x6900000gn/T/go-build497481945
# example.com/bdd-example
godog_dependency_file_test.go:3:8: cannot find package "." in:
/Users/jweinert/src/bdd-example/vendor/github.com/cucumber/godog
FAIL example.com/bdd-example [setup failed]
✅ What did you expect to see?
I expected to see the output from the README.md.
Feature: eat godogs
In order to be happy
As a hungry gopher
I need to be able to eat godogs
Scenario: Eat 5 out of 12 # features/godogs.feature:6
Given there are 12 godogs
When I eat 5
Then there should be 7 remaining
1 scenarios (1 undefined)
3 steps (3 undefined)
220.129µs
You can implement step definitions for undefined steps with these snippets:
func iEat(arg1 int) error {
return godog.ErrPending
}
func thereAreGodogs(arg1 int) error {
return godog.ErrPending
}
func thereShouldBeRemaining(arg1 int) error {
return godog.ErrPending
}
func InitializeScenario(ctx *godog.ScenarioContext) {
ctx.Step(`^I eat (\d+)$`, iEat)
ctx.Step(`^there are (\d+) godogs$`, thereAreGodogs)
ctx.Step(`^there should be (\d+) remaining$`, thereShouldBeRemaining)
}
📦 Which tool/library version are you using?
go install github.com/cucumber/godog/cmd/godog@v0.12.0
🔬 How could we reproduce it?
OS: macOS 12.3.1
Go: 1.18.1
Steps to reproduce the behavior:
Install the latest godog
go install github.com/cucumber/godog/cmd/godog@v0.12.0
Create a new go module
go mod init example.com/test
Attempt to build in the directory.
godog build
Observe error
The text was updated successfully, but these errors were encountered:
👓 What did you see?
Running
godog build
orgodog run
returns an error about not being able to import godog.✅ What did you expect to see?
I expected to see the output from the README.md.
📦 Which tool/library version are you using?
🔬 How could we reproduce it?
OS: macOS 12.3.1
Go: 1.18.1
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: