Skip to content

Commit

Permalink
fix(test): add sample app to fix failing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Caffey committed May 15, 2021
1 parent e4fb850 commit 54444d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/django-cdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ export interface DjangoCdkProps {

/**
* Name of existing bucket to use for media files
*
*
* This name will be auto-generated if not specified
*/
readonly bucketName?: string;

/**
* The VPC to use for the application. It must contain
* The VPC to use for the application. It must contain
* PUBLIC, PRIVATE and ISOLATED subnets
*
*
* A VPC will be created if this is not specified
*/
readonly vpc?: ec2.IVpc;

/**
* The location of the Dockerfile used to create the main
* The location of the Dockerfile used to create the main
* application image. This is also the context used for building the image.
*
*
* TODO: set image and context path separately.
*/
readonly imageDirectory: string;

/**
* The command used to run the API web service.
* The command used to run the API web service.
*/
readonly webCommand?: string[];

/**
* Used to enable the celery beat service.
*
*
* @default false
*/
readonly useCeleryBeat?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions test/djangoCdk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test('create app', () => {

const djangoCdkProps: DjangoCdkProps = {
bucketName: 'my-bucket',
imageDirectory: './test/django-step-by-step/backend',
imageDirectory: './test/test-app/backend',
webCommand: ['gunicorn'],
};
new DjangoCdk(stack, 'TestDjangoCdkStack', djangoCdkProps);
Expand All @@ -30,7 +30,7 @@ test('create app with default bucket name', () => {
const stack = new cdk.Stack(app, 'MyStack', { env });

const djangoCdkProps: DjangoCdkProps = {
imageDirectory: './test/django-step-by-step/backend',
imageDirectory: './test/test-app/backend',
webCommand: ['gunicorn'],
};
new DjangoCdk(stack, 'TestDjangoCdkStack', djangoCdkProps);
Expand Down
1 change: 1 addition & 0 deletions test/test-app/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM scratch

0 comments on commit 54444d0

Please sign in to comment.