-
Notifications
You must be signed in to change notification settings - Fork 81
fix: VAULT_SKIP_VERIFY inverted behavior #94
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
fix: VAULT_SKIP_VERIFY inverted behavior #94
Conversation
VAULT_SKIP_VERIFY=1 was actually ENABLING verify while VAULT_SKIP_VERIFY=0 was SKIPPING verify. We want the opposite.
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.
Thanks for the MR we should use it like the vault CLI uses it.
Only one suggestion to use assert! instate of assert_eq! but I leave it up to you if you want to apply them
| env::remove_var(VAULT_SKIP_VERIFY); | ||
| let client = build_client(); | ||
| assert!(client.settings.verify); | ||
| assert_eq!(client.settings.verify, true); |
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.
| assert_eq!(client.settings.verify, true); | |
| assert!(client.settings.verify); |
| env::set_var(VAULT_SKIP_VERIFY, value); | ||
| let client = build_client(); | ||
| assert!(!client.settings.verify); | ||
| assert_eq!(client.settings.verify, true); |
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.
| assert_eq!(client.settings.verify, true); | |
| assert!(client.settings.verify); |
| let client = build_client(); | ||
| assert!(client.settings.verify); | ||
| // Setting truthy value for SKIP_VERIFY should disable verify | ||
| assert_eq!(client.settings.verify, false); |
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.
| assert_eq!(client.settings.verify, false); | |
| assert!(!client.settings.verify); |
|
Gentle bump reminder on this 😄 We're having to run this in the inverted state with |
|
Thanks for submitting this PR, I will close these now that #160 has been merged |
VAULT_SKIP_VERIFY=1 was actually ENABLING verify while VAULT_SKIP_VERIFY=0 was SKIPPING verify. We want the opposite.
I was able to
cargo buildbut notcargo testin anix developshell, I had failure:This does not seem related to my local changes, maybe Nix dev shell is broken?
But I hope change is simple enough, if a reviewer or owner can test it on its own :)