-
Notifications
You must be signed in to change notification settings - Fork 136
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
Adds options for mounts #196
Conversation
payload = { type: type } | ||
# @param [String] options | ||
# mount type specific options that are passed to the backend (optional) | ||
def mount(path, type, description = nil, options = {}) |
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.
prefer that options includes :description
... maybe some fallback if options is not a hash, then treat it as description
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.
Not sure I understand this comment, do you mean that options contains a description? Or to remove the extra attribute?
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.
both :D
def mount(path, type, options = {})
description = (options.is_a?(Hash) ? options[:description] : options)
it "returns the options from a mount" do | ||
next unless has_options_for_mount? | ||
|
||
expect(subject.mount("kv_v2_mount", "kv", 'kv v2 mount', options: {version: "2"})).to be(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.
isn't this supposed to be
expect(subject.mount("kv_v2_mount", "kv", 'kv v2 mount', options: {version: "2"})).to be(true) | |
expect(subject.mount("kv_v2_mount", "kv", 'kv v2 mount', version: "2")).to be(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.
Nope, it's an options hash containing the entry of version . AFAIK :https://www.vaultproject.io/api/system/mounts.html#options
e4c5e79
to
5f8fb8c
Compare
will anyone push the merge button? 😺 |
5f8fb8c
to
903964e
Compare
* Allows us to check what kv version is mounted * Also allows us to retrieve options from existing mounts * Restricts to 0.10+ for specs
903964e
to
c7a3729
Compare
* Adds readline for pry * Detect if VAULT_VERSION is unset * Change to the latest 3 releases in Travis
c7a3729
to
90b1146
Compare
mounts
Closes #195