Skip to content

Improve testing coverage on ExtractProvisionerDaemonAuthenticated middleware #15604

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

Closed
defelmnq opened this issue Nov 20, 2024 · 0 comments · Fixed by #15622
Closed

Improve testing coverage on ExtractProvisionerDaemonAuthenticated middleware #15604

defelmnq opened this issue Nov 20, 2024 · 0 comments · Fixed by #15622
Labels
needs-triage Issue that require triage

Comments

@defelmnq
Copy link
Contributor

We have the ExtractProvisionerDaemonAuthenticated middleware : https://github.com/coder/coder/blob/main/coderd/httpmw/provisionerdaemon.go#L28 which is used while doing a call from a provisioner daemon and critical but lacks coverage - would need to improve this part and ensure it is well tested.

@coder-labeler coder-labeler bot added the needs-triage Issue that require triage label Nov 20, 2024
defelmnq added a commit that referenced this issue Nov 26, 2024
…ted middleware (#15622)

This one aims to resolve #15604 

Created some table tests for the main cases - 
also preferred to create two isolated cases for the most complicated
cases in order to keep table tests simple enough.

Give us full coverage on the middleware logic, for both optional and non
optional cases - PSK and ProvisionerKey.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue that require triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant