-
Notifications
You must be signed in to change notification settings - Fork 520
Add first patch release changelog integration test #1023
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 first patch release changelog integration test #1023
Conversation
The failing test is expected due to the missing token. |
@saschagrunert -- None of our release tools should support passing the GitHub token as a flag. We should instead read it in from the environment. It opens us up to token exposure in log output. I'd like to see that option removed from any tools that have it today. |
/hold |
Yes, I will include a check for |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: saschagrunert The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
cmd/krel/cmd/changelog_test.go
Outdated
cwd, err := os.Getwd() | ||
require.Nil(t, err) | ||
testDataDir := filepath.Join(cwd, "test") | ||
tempDir := filepath.Join(testDataDir, "tmp") |
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.
Is there a reason why we do that in the repo's dir and not in the system's temp dir? Also, if I am not mistaken, we don't clean that up, or do we?
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 had issues accessing the /tmp
dir when running in bazel, maybe you know a better way around it?
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.
So you are saying something like ioutil.TempDir(...)
does not work in the bazel sandbox? I'll try to reproduce that thing, maybe I'll find something.
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.
Yes I think so, I can give it another try 🤷♂️
"changelog_test.go", | ||
"root_test.go", | ||
], | ||
data = glob(["testdata/**"]), |
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.
@hoegaarden this seems to work as well 🤷♂️
Signed-off-by: Sascha Grunert <[email protected]>
Closing in favor of #1068 |
We now use a bare repo to integration test (or e2e test) the changelog functionality. A patch release integration test has been added as well, but we still need tests for the other use cases.