Skip to content

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

Merged
onsi merged 1 commit into
onsi:masterfrom
alegrey91:master
Jun 7, 2023
Merged

feat(ginkgo/generators): add --tags flag#1216
onsi merged 1 commit into
onsi:masterfrom
alegrey91:master

Conversation

@alegrey91

@alegrey91 alegrey91 commented Jun 2, 2023

Copy link
Copy Markdown
Contributor

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

onsi commented Jun 7, 2023

Copy link
Copy Markdown
Owner

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

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