Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build tags? #154

Open
kleijnweb opened this issue Jan 16, 2019 · 1 comment
Open

build tags? #154

kleijnweb opened this issue Jan 16, 2019 · 1 comment

Comments

@kleijnweb
Copy link

I separate different kinds of tests using build tags, eg:

// +build functional

package main

import (
	"fmt"
	"github.com/DATA-DOG/godog"
)
...
func FeatureContext(s *godog.Suite) {
	s.Step(`^there are (\d+) godogs$`, thereAreGodogs)
	s.Step(`^I eat (\d+)$`, iEat)
	s.Step(`^there should be (\d+) remaining$`, thereShouldBeRemaining)

	s.BeforeScenario(func(interface{}) {
		Godogs = 0 // clean the state before every scenario
	})
}
...

when I run godog without args, it cannot find the context initializer. Is there any way to make this work with godog?

@l3pp4rd
Copy link
Member

l3pp4rd commented Jan 16, 2019

Hi, yes at the moment godog command line tool does not accept build tags. For now you can run it in TestMain function using go test -tags tag.

I'll need to think about such an option for godog command for relaying build tags or in general build arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants