Skip to content
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

Argument order #444

Merged
merged 2 commits into from
Aug 15, 2023
Merged

Argument order #444

merged 2 commits into from
Aug 15, 2023

Conversation

dlnilsson
Copy link
Contributor

in cases where all credentials are resolved without config file (environment variables)
we need to run these functions in the right order, first resolve the root.PersistentPreRunE (to resolve the bearer token etcetra)
after we have resolved those values, we can continue with the sub-command and correctly assert opts.Appliance() without having to worry about empty Authorization header value, which is the current case in the main branch.

This PR fixes cases where we have disabled keyring and do not persist the bearer token value, as example:

SDPCTL_URL=https://controller.appgate.devops:8443/ SDPCTL_API_VERSION=19 SDPCTL_NO_KEYRING=true SDPCTL_USERNAME=usernmaeSDPCTL_PASSWORD=the_password sdpctl appliance export-seed

in cases where all credentials are resolved without config file (environment variables)
we need to run these functions in the right order, first resolve the root.PersistentPreRunE (to resolve the bearer token etcetra)
after we have resolved those values, we can continue with the sub-command and correctly assert opts.Appliance() without having to worry about
empty Authorization header value, which is the current case in the main branch.

This PR fixes cases where we have disabled keyring and do not persist the bearer token value, as example:

```bash
SDPCTL_URL=https://controller.appgate.devops:8443/ SDPCTL_API_VERSION=19 SDPCTL_NO_KEYRING=true SDPCTL_USERNAME=usernmaeSDPCTL_PASSWORD=the_password sdpctl appliance export-seed
```
@dlnilsson
Copy link
Contributor Author

Tests fails because of #442

@CLAassistant
Copy link

CLAassistant commented Aug 15, 2023

CLA assistant check
All committers have signed the CLA.

@kajes kajes merged commit 17e8d0a into main Aug 15, 2023
3 checks passed
@kajes kajes deleted the argument-order branch August 15, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants