Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat(coderd): add endpoint to fetch provisioner key details #15505
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
feat(coderd): add endpoint to fetch provisioner key details #15505
Changes from 1 commit
995a046
2ca6c91
c67d322
911a47d
1a019bb
c629f07
54437f2
8eeffb1
960084d
4a38977
c89bcd8
0af9e8e
4680484
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Nit: use a const here
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 be quite specific in the error you're checking for. The intent is not expressed clearly enough here.
This test should effectively be saying "Provisioner PSKs are similar to provisioner keys, but they cannot be used to retrieve information about a provisioner, so we get this very specific error message".
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.
TBH I feel like i'm maybe missing something or we're over testing the same thing here. as the code is always coding the same method and filling the same header - we will always fall into the same test case in the middleware.
Not that I want to minimise the tests - but at the end :
https://github.com/coder/coder/pull/15505/files#diff-2eae6501c14fe87b5578bcd6fda3588cffb28d437c61765e3829ff530906927cR376 -> here we set the same header hardcoded.
https://github.com/coder/coder/blob/main/coderd/httpmw/provisionerdaemon.go#L28 -> This middleware will never really go into the PSK / CoderSession logic as they're never set on the other side.
I would rather add tests into the middleware if we want to increase coverage.
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.
Ditto.