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

feat(ginkgo/generators): add --tags flag #1216

Merged
merged 1 commit into from Jun 7, 2023
Merged

Conversation

alegrey91
Copy link
Contributor

@alegrey91 alegrey91 commented Jun 2, 2023

This PR adds a new flag --tags under the ginkgo generate command.
This flag allows the user to add the build tags that he needs for the tests.

Closes #1213

Example command:

ginkgo generate -tags "unit || e2e" test

This will generate the following file:

//go:build unit || e2e

package main_test

import (
	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"

	"github.com/onsi/ginkgo/v2/ginkgo"
)

var _ = Describe("Test", func() {

})

Signed-off-by: Alessio Greggi <ale_grey_91@hotmail.it>
@onsi
Copy link
Owner

onsi commented Jun 7, 2023

sorry for the delay - i was out on vacation! running this now.

@onsi onsi merged commit a782a77 into onsi:master Jun 7, 2023
6 checks passed
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

Successfully merging this pull request may close these issues.

Add -tags flag to ginkgo generate command
2 participants