-
Notifications
You must be signed in to change notification settings - Fork 520
Enhance testing for document
package.
#1180
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
Enhance testing for document
package.
#1180
Conversation
Hi @j0n3lson. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @saschagrunert |
/hold I found a bug in the rendering. I will update the PR once fixed. |
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.
/lgtm
/ok-to-test |
/lgtm cancel |
/kind cleanup |
/hold cancel Ready to go. The bug was for entries not printing on their new line. I introduced the back a few commits back while trying to fix the "no-new-line-at-end-of-document-problem" which annoyingly doesn't seem possible in golang templates. I settled for |
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.
/lgtm
/retest |
/test pull-release-test |
@j0n3lson might give it a rebase to pull in the latest test-fixes |
Hey Sasha,
I fixed it in my local side. I've not had a chance to look again in a bit.
I think I'll have time on Friday to rebase and push. I was only blocked on
making the test pass.
|
Awesome, thank you for the update and keeping us posted. |
Heya @saschagrunert just crawled out from my rock. Mind taking a look now? |
Fixes: * When a category (kind) has multiple note entries, ensure each entry is printed on a separate line. * Remove leading unwanted characters from note markdowns. The default go template prepends a dash ("-") before each note. Deprecation: * Removes `TestNoteCollection()` and `TestRenderMarkdownTeamplateGoldenFile()`. Both of these methods have been replaced with `TestDocument_RenderMarkdownTemplate` which tests the same functionality. * Removes `sortKinds()` and associated test case. This method was deprecated in PR#1148 when sorting was moved to `CreateDocument()` Enhancements: * Add a test case for `CreateDocument()`. * When testing template rendering, use `CreateDocument()` the same way a package user would. This makes it easier to test from the user's point of view.
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.
/lgtm
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.
/lgtm
/lgtm Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, j0n3lson, justaugustus, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
In support of #1016 this PR enhances and increase code coverage within
document
package.Fixes
When a category (kind) has multiple note entries, ensure each entry is printed on a separate line.
Remove leading unwanted characters from note markdowns. The default go template
prepends a dash ("-") before each note.
Deprecation:
Removes
TestNoteCollection
andTestRenderMarkdownTeamplateGoldenFile
. Both of these methods have been replaced withTestDocument_RenderMarkdownTemplate
which tests the same functionality.Removes
sortKinds()
and associated test case. This method was deprecated inPR#1148 when sorting was moved to
CreateDocument()
Enhancements:
Add a test case for
CreateDocument()
.When testing template rendering, use
CreateDocument()
the same way a package user would. This makes it easier to test from the user's point of view.Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:
Does this PR introduce a user-facing change?