Document toolboxDocument toolbox

Running STS Tests

By default, STS tests (StsManagerImplAutowiredTestin repository-managers) and (ITStsTest in integration-tests) will be skipped if you don’t have STS configured locally. You’ll want to follow these steps to enable those tests.

Running STS Tests Locally

To run this locally, make sure your stackbuilder is up-to-date, and re-run if necessary. In CloudFormation, find your stack, go to Outputs, and find the entry called TempCredentialsServiceRoleArn. The entry should look like

arn:aws:iam::123456789012:role/dev-username-shared-res-etcetc

Add this entry to your ~/.m2/settings.xml:

<org.sagebionetworks.sts.iam.arn>arn:aws:iam::123456789012:role/dev-username-shared-res-etcetc</org.sagebionetworks.sts.iam.arn>

Now you can run your tests locally.

Running STS Tests in Jenkins

Update your stackbuilder and get the IAM role ARN as described above.

In your Jenkins pbuild, go to “Configure”, scroll down to “Build”, “Execute shell”, “Command”. Add the following anywhere before the jenkins_build.sh:

export org_sagebionetworks_sts_iam_arn=arn:aws:iam::123456789012:role/dev-username-shared-res-etcetc

Now your pbuild should run the STS tests.