Skip to content

Commit

Permalink
test events
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Dec 10, 2023
1 parent 112f7a9 commit f0182fd
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ project.synth();


function override_file_key(file: string, key: string) {
const KEYS = "AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_ACCOUNT_ID AWS_DEFAULT_REGION CDK_APP_NAME CDK_DEFAULT_EMAIL QUILT_CATALOG_DOMAIN".split(" ");
var opts: {[key: string]: string} = {CI: 'true'};
const KEYS = 'AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_ACCOUNT_ID AWS_DEFAULT_REGION CDK_APP_NAME CDK_DEFAULT_EMAIL QUILT_CATALOG_DOMAIN'.split(' ');
var opts: {[key: string]: string} = { CI: 'true' };
for (const k of KEYS) {
opts[k] = `\${{ secrets.${k} }}`;
}
opts.CDK_DEFAULT_ACCOUNT = opts['AWS_ACCOUNT_ID'];
opts.CDK_DEFAULT_REGION = opts['AWS_DEFAULT_REGION'];
opts.CDK_DEFAULT_ACCOUNT = opts.AWS_ACCOUNT_ID;
opts.CDK_DEFAULT_REGION = opts.AWS_DEFAULT_REGION;

project.tryFindObjectFile(file)?.addOverride(key, opts);
}
Expand Down
2 changes: 1 addition & 1 deletion src/omics-quilt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Rule } from 'aws-cdk-lib/aws-events';
import { SnsTopic } from 'aws-cdk-lib/aws-events-targets';
import {
AccountPrincipal,
ArnPrincipal,
ManagedPolicy,
PolicyStatement,
Role,
Expand All @@ -22,7 +23,6 @@ import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { StringParameter } from 'aws-cdk-lib/aws-ssm';
import { type Construct } from 'constructs';
import { Constants } from './constants';
import { ArnPrincipal } from 'aws-cdk-lib/aws-iam';

export class OmicsQuiltStack extends Stack {
public readonly inputBucket: Bucket;
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions test/events/event-output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0",
"id": "7adb44c4-b4c1-feea-0570-b4d8b8f883ff",
"detail-type": "Run Status Change",
"source": "aws.omics",
"account": "712023778557",
"time": "2023-12-07T23:29:30Z",
"region": "us-east-1",
"resources": [
"arn:aws:omics:us-east-1:712023778557:run/8637245"
],
"detail": {
"omicsVersion": "1.0.0",
"arn": "arn:aws:omics:us-east-1:712023778557:run/8637245",
"status": "COMPLETED",
"uuid": "b8c62310-1612-b461-a257-04f3b9c282d2",
"runOutputUri": "s3://omics-quilt-omicsquiltckaoutput712023778557useast-1r7hdb9111n3i/outputs/8637245"
}
}

0 comments on commit f0182fd

Please sign in to comment.