Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Added testcase for Instance Profile Information Presented in Instance Metadata Service #228

Open
wants to merge 7 commits into
base: testing
Choose a base branch
from

Conversation

hspencer77
Copy link
Member

Added a testcase that allows Instance Profile Name/ARN to be passed when running instances. This case was developed to test the metadata service (http://169.254.169.254/latest/metadata/) regarding instance profile of an instance for consistency.
The following meta-data attributes are tested:

  • iam/security-credentials/
  • iam/info/instance-profile-arn
  • iam/info/instance-profile-id
  • iam/info/last-updated-date
    If any of these tests fail, the test case will error out; logging the results.

Examples of using either instance profile name or instance profile ARN in testcase are below:

String length tests are based on the following AWS specs:

@@ -2404,6 +2406,8 @@ def run_instance(self,
:param max: Maxiumum instances to launch, default 1
:param user_data: User-data string to pass to instance
:param private_addressing: Runs an instance with only private IP address
:param instance_profile_name: name of the IAM (Euare) profile to associate with the instances
:param instance_profile_arn: ARN of the IAM (Euare) instance profile to associate with the instances
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just add 1 param which is the name, and then translate to the arn if necessary?

@shaon
Copy link
Member

shaon commented Mar 5, 2015

Hey @hspencer77, good work here. We should definitely have this test in and start running in the CI. Would you mind sending a PR to the master branch by changing the class name to something like "InstanceProfileTests"?

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

Successfully merging this pull request may close these issues.

3 participants