-
Notifications
You must be signed in to change notification settings - Fork 931
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
Tests: Remove gen_cert
util
#14449
Tests: Remove gen_cert
util
#14449
Conversation
Please don't keep us in suspense, what was it? :) |
ah ok will read those :) |
Hmmm test failures. Weird because the auth tests passed locally. Will look into it. |
This test was unnecessarily moving certificates around to test that a server administrator can create and edit certificates. This is simplified by using a separate LXD_CONF directory. Additionally, now use `gen_cert_and_key` instead of `gen_cert`. Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
This util did not specify the `--auth-type` flag when adding the dummy remote. This caused issues if another LXD is running on the host machine while listening on :8443 with OIDC configured. The `remote add` command would fail and get the OIDC headers, then attempt to start the device authorization grant flow with the IdP configured on the other LXD. With `BROWSER=curl` set for use with the `mini-oidc` test util, it was causing `lxc` to attempt to curl the code verification page. Since we have a simpler and more efficient equivalent in `gen_cert_and_key`, I've opted to remove it instead of setting the `--auth-type` flag to avoid this behaviour. Signed-off-by: Mark Laing <[email protected]>
a679840
to
84896c2
Compare
Should be sorted now. The value of |
The `gen_cert` util had a weird side-effect if I was concurrently running a LXD snap with OIDC configured. (I realise that there can be some test failures when doing this related to networks etc. but I do it regularly when running a single suite as I'm often using the snapped LXD for something else). I've put more details in the commit messages. Additionally simplifies the `user_is_server_admin` function in the fine-grained auth tests. Signed-off-by: hamistao <[email protected]>
The
gen_cert
util had a weird side-effect if I was concurrently running a LXD snap with OIDC configured. (I realise that there can be some test failures when doing this related to networks etc. but I do it regularly when running a single suite as I'm often using the snapped LXD for something else). I've put more details in the commit messages.Additionally simplifies the
user_is_server_admin
function in the fine-grained auth tests.