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

fix: test IAM.getUser instead of listUsers #3542

Merged
merged 1 commit into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions features/iam/iam.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Feature: IAM
Scenario: Users
Given I have an IAM username "js-test"
And I create an IAM user with the username
And I list the IAM users
Then the list should contain the user
And I get the IAM user
Then the IAM user should exist
And I delete the IAM user

Scenario: Roles
Expand Down
11 changes: 4 additions & 7 deletions features/iam/step_definitions/iam.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ module.exports = function() {
this.request('iam', 'createUser', {UserName: this.iamUser}, next, false);
});

this.Given(/^I list the IAM users$/, function(callback) {
this.request('iam', 'listUsers', {}, callback);
this.Given(/^I get the IAM user$/, function(callback) {
this.request('iam', 'getUser', {UserName: this.iamUser}, callback);
});

this.Then(/^the list should contain the user$/, function(callback) {
var name = this.iamUser;
this.assert.contains(this.data.Users, function(user) {
return user.UserName === name;
});
this.Then(/^the IAM user should exist$/, function(callback) {
this.assert.equal(this.data.User.UserName, this.iamUser);
callback();
});

Expand Down