-
Notifications
You must be signed in to change notification settings - Fork 626
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
Create secret with bearer-token #3617
Conversation
@aryan9600 Thank you for the review. I've addressed them as advised, requesting a review. |
@Santosh1176 I tried your tests and found that the newline is expected. Our test tooling supports an $ make test TEST_PKG_PATH="./cmd/flux" TEST_ARGS="-run TestCreateGitSecret -update" The golden file got updated and I got the following diff: diff --git a/cmd/flux/testdata/create_secret/git/git-bearer-token.yaml b/cmd/flux/testdata/create_secret/git/git-bearer-token.yaml
index 52a37a25..7dcfde2d 100644
--- a/cmd/flux/testdata/create_secret/git/git-bearer-token.yaml
+++ b/cmd/flux/testdata/create_secret/git/git-bearer-token.yaml
@@ -6,3 +6,4 @@ metadata:
namespace: my-namespace
stringData:
bearerToken: ghp_baR2qnFF0O41WlucePL3udt2N9vVZS4R0hAS
+ And after that, running the test without the
The other secret related tests also use |
@darkowlzz Thank you for clarifying this for me, really helps. I'll look into the error part. |
eaa6146
to
34adb42
Compare
After addressing the above review comments, please rebase on the latest main branch, squash all the commits into one and mark this PR as ready. It looks almost ready to me. |
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.
Overall, it looks good to me. Thanks for implementing it.
It'd be better to have one more reviewer go through it before we merge it.
Signed-off-by: Santosh Kaluskar <[email protected]>
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!
Thank you for your guidance. |
This is for creating a secret with a git bearer-token.
The tests are failing due to some new lines being added to the golden file. I've tested the generated manifest and it's in line with the one in the
./testdata
dir.I need further guidance on whether the data for
bearerToken
needs to be captured as.data.bearerToken
or.stringData.bearerToken
? The current implementation is for.stringData
This PR attempts to close #3536