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

fix: test IAM.getUser instead of listUsers #3542

merged 1 commit into from
Nov 20, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Nov 20, 2020

The test fails if there are more than 100 users, as it parses users from
first page of results. This code change explicitly requests for the created user
to ensure it doesn't return pages of results.

Testing
$ npm run integration -- --tags @iam

> aws-sdk@2.797.0 integration /Users/trivikr/workspace/aws-sdk-js
> cucumber.js "--tags" "@iam"

@iam
Feature: IAM

  I want to use IAM


  Scenario: Users                              # features/iam/iam.feature:7
    Given I have an IAM username "js-test"     # features/iam/iam.feature:8
    And I create an IAM user with the username # features/iam/iam.feature:9
    And I get the IAM user                     # features/iam/iam.feature:10
    Then the IAM user should exist             # features/iam/iam.feature:11
    And I delete the IAM user                  # features/iam/iam.feature:12


  Scenario: Roles                                            # features/iam/iam.feature:14
    Given I create an IAM role with name prefix "aws-sdk-js" # features/iam/iam.feature:15
    Then the IAM role should exist                           # features/iam/iam.feature:16
    And I delete the IAM role                                # features/iam/iam.feature:17


  Scenario: Error handling                              # features/iam/iam.feature:19
    Given I have an IAM username "js-test-dupe"         # features/iam/iam.feature:20
    And I create an IAM user with the username          # features/iam/iam.feature:21
    And I create an IAM user with the username          # features/iam/iam.feature:22
    Then the error code should be "EntityAlreadyExists" # features/iam/iam.feature:23
    And I delete the IAM user                           # features/iam/iam.feature:24


3 scenarios (3 passed)
13 steps (13 passed)
Checklist
  • run npm run integration if integration test is changed

The test fails if there are more than 100 users, as it parses users from
first page of results. This code change explicitly requests for the created user
to ensure it doesn't return pages of results.
@alexforsyth alexforsyth self-requested a review November 20, 2020 22:50
Copy link
Contributor

@alexforsyth alexforsyth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@trivikr trivikr merged commit 44ded82 into aws:master Nov 20, 2020
@trivikr trivikr deleted the integ-test-iam-getUser branch November 20, 2020 22:52
@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-v2-github
  • Commit ID: 98001ad
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants