-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add acceptance tests and ignore no such file or directory
errors in cleaning rendered website dir
#296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reach out with any questions!
cmd/tfplugindocs/testdata/scripts/generate/framework_provider_success_generic_templates.txtar
Show resolved
Hide resolved
cmd/tfplugindocs/testdata/scripts/generate/framework_provider_success_generic_templates.txtar
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this should be good to go!
cmd/tfplugindocs/testdata/scripts/generate/framework_provider_success_generic_templates.txtar
Show resolved
Hide resolved
cmd/tfplugindocs/testdata/scripts/generate/framework_provider_success_generic_templates.txtar
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🚀
@@ -146,6 +146,7 @@ using the following data fields and functions: | |||
| `.ProviderName` | string | Canonical provider name (ex. `terraform-provider-random`) | | |||
| `.ProviderShortName` | string | Short version of the provider name (ex. `random`) | | |||
| `.RenderedProviderName` | string | Value provided via argument `--rendered-provider-name`, otherwise same as `.ProviderName` | | |||
| `.SchemaMarkdown` | string | a Markdown formatted Provider Schema definition | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
@@ -170,6 +172,7 @@ using the following data fields and functions: | |||
| `lower` | Equivalent to [`strings.ToLower`](https://pkg.go.dev/strings#ToLower). | | |||
| `plainmarkdown` | Render Markdown content as plaintext. | | |||
| `prefixlines` | Add a prefix to all (newline-separated) lines in a string. | | |||
| `printf` | Equivalent to [`fmt.Printf`](https://pkg.go.dev/fmt#Printf). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
testscript
acceptance tests fortfplugindocs generate
subcommand:no such file or directory
errors in cleaning rendered website directory: the acceptance tests revealed a bug introduced in generate: Remove onlytfplugindocs
managed files and subdirectories from rendered website directory #267 where providers with no existing docs would return early with an error when deleting the rendered website directory before generation.This PR includes a fix to ignore that specific error and not return early.
resourceTemplate.Render
andproviderTemplate.Render