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

Support for bootstrap commands to use custom data for templates #1110

Merged
merged 1 commit into from Jan 5, 2023

Conversation

Dannyb48
Copy link
Contributor

@Dannyb48
Copy link
Contributor Author

Dannyb48 commented Jan 5, 2023

@onsi when you get a chance can you review this PR?

@onsi
Copy link
Owner

onsi commented Jan 5, 2023

hey @Dannyb48 this looks great - thanks for putting it together and apologies for the delay on my end. I'm back in town now :)

I only have a couple of comments that I'll leave on the commit, but then should be good to pull in.

docs/index.md Outdated
{ "suitename": "E2E",
"labels": ["fast", "parallel", "component"]}
```
The custom data can be could accessed like so:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo:

"The custom data can be could accessed like so:" => "The custom data can be accessed like so:"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, done

@@ -25,6 +26,9 @@ func BuildBootstrapCommand() command.Command {
{Name: "template", KeyPath: "CustomTemplate",
UsageArgument: "template-file",
Usage: "If specified, generate will use the contents of the file passed as the bootstrap template"},
{Name: "templatedata", KeyPath: "CustomTemplateData",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this template-data to be more consistent with the rest of Ginkgo's multi-word flags? Thanks!

Copy link
Contributor Author

@Dannyb48 Dannyb48 Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, done

@@ -28,6 +29,9 @@ func BuildGenerateCommand() command.Command {
{Name: "template", KeyPath: "CustomTemplate",
UsageArgument: "template-file",
Usage: "If specified, generate will use the contents of the file passed as the test file template"},
{Name: "templatedata", KeyPath: "CustomTemplateData",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we make this template-data to be more consistent with the rest of Ginkgo's multi-word flags? Thanks!

Copy link
Contributor Author

@Dannyb48 Dannyb48 Jan 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, done

 * Includes updates to docs
 * Includes associated integration tests
@onsi
Copy link
Owner

onsi commented Jan 5, 2023

LGTM thanks!

I'll merge this in and probably cut a release next week after i finish up a few other things i'm working on.

@onsi onsi merged commit 7a2b242 into onsi:master Jan 5, 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.

Support for passing in custom template data when using a template file for the bootstrap and generate commands
2 participants