Unverified Commit ace9c5c6 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Add EKS integration test (#720)

parent 0dd0c93f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ name = "aws-config"
version = "0.1.0"
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
edition = "2018"
exclude = ["test-data/*"]
exclude = ["test-data/*", "integration-tests/*"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
+8 −0
Original line number Diff line number Diff line
*.js
!jest.config.js
*.d.ts
node_modules

# CDK asset staging directory
.cdk.staging
cdk.out
+6 −0
Original line number Diff line number Diff line
*.ts
!*.d.ts

# CDK asset staging directory
.cdk.staging
cdk.out
+14 −0
Original line number Diff line number Diff line
# CDK Stack for EKS credentials provider testing

This project defines a CDK stack that launches an EKS cluster, creates a DynamoDB table, and sets up a service account role so that the DynamoDB pod can access the table.

`test.rs` is provided as an example script to run.

## Usage
```bsh
cdk bootstrap aws://accountid/region
cdk deploy
# make lunch, go for a bike ride, etc. ~1h.
kubectl exec rust-sdk-test -it bash
# write some rust code, eg. test.rs, run it.
```
+21 −0
Original line number Diff line number Diff line
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from '@aws-cdk/core';
import { EksCredentialsStack } from '../lib/eks-credentials-stack';

const app = new cdk.App();
new EksCredentialsStack(app, 'EksCredentialsStack', {
  /* If you don't specify 'env', this stack will be environment-agnostic.
   * Account/Region-dependent features and context lookups will not work,
   * but a single synthesized template can be deployed anywhere. */

  /* Uncomment the next line to specialize this stack for the AWS Account
   * and Region that are implied by the current CLI configuration. */
  // env: { account: process.env.CDK_DEFAULT_ACCOUNT, region: process.env.CDK_DEFAULT_REGION },

  /* Uncomment the next line if you know exactly what Account and Region you
   * want to deploy the stack to. */
  // env: { account: '123456789012', region: 'us-east-1' },

  /* For more information, see https://docs.aws.amazon.com/cdk/latest/guide/environments.html */
});
Loading