-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add entity/entity alias primitives #41
Conversation
@suprjinx This is my first Ruby PR, still not sure of all the idioms, so don't hesitate to be harsh, when reviewing. Thanks! |
err = assert_raises RuntimeError do | ||
@client.read_entity_alias(@entity_name, @alias_name) | ||
end | ||
assert_match /no such entity/, err.message |
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.
nice
test/lib/clients/vault_test.rb
Outdated
auth_method = "token" | ||
@client.put_entity_alias(@entity_name, @alias_name, auth_method) | ||
entity_alias = @client.read_entity_alias(@entity_name, @alias_name) | ||
assert_equal entity_alias.data[:mount_type], auth_method |
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.
i think in general the first argument is the expectation, and the second is the actual being tested -- reversed here and in other test above.
https://ruby-doc.org/stdlib-3.0.0/libdoc/minitest/rdoc/Minitest/Assertions.html
@suprjinx I've fixed for your comments and the tests are now passing. |
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.
Looks good!
I noticed the flaky tests when running rails test, but they appear to be fixed by this PR: #40 , so I didn't address them.