Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
5d committed Oct 16, 2024
1 parent 6428b72 commit 0a70f0d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 16 deletions.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "7b47ddfb2263069c3b869435e50ba8d24ccf5b9e091a25580efc357b16f74f05.zip"
"S3Key": "5f423dafe44709194603938ad3f10121b2673256565f3101fd70279bbfb48526.zip"
},
"Handler": "bootstrap",
"Role": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import { App, Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as lambda from '../lib';
import { Runtime } from 'aws-cdk-lib/aws-lambda';
import { IFunction, Runtime } from 'aws-cdk-lib/aws-lambda';
import * as integ from '@aws-cdk/integ-tests-alpha';

/*
Expand All @@ -11,10 +11,11 @@ import * as integ from '@aws-cdk/integ-tests-alpha';
*/

class TestStack extends Stack {
public readonly lambdaFunction: IFunction
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);

new lambda.GoFunction(this, 'go-handler-docker', {
this.lambdaFunction = new lambda.GoFunction(this, 'go-handler-docker', {
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
runtime: Runtime.PROVIDED_AL2023,
bundling: {
Expand All @@ -28,6 +29,13 @@ class TestStack extends Stack {
const app = new App();
const stack = new TestStack(app, 'cdk-integ-lambda-golang-provided-al2023');

new integ.IntegTest(app, 'lambda-go-runtime', {
const integTest = new integ.IntegTest(app, 'lambda-go-runtime', {
testCases: [stack],
});

const response = integTest.assertions.invokeFunction({
functionName: stack.lambdaFunction.functionName,
});

response.expect(integ.ExpectedResult.exact('256.0'));

10 changes: 5 additions & 5 deletions packages/@aws-cdk/aws-lambda-go-alpha/test/integ.function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as path from 'path';
import { App, Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as lambda from '../lib';
import * as integ from "@aws-cdk/integ-tests-alpha";
import { IFunction } from "aws-cdk-lib/aws-lambda";
import * as integ from '@aws-cdk/integ-tests-alpha';
import { IFunction } from 'aws-cdk-lib/aws-lambda';

/*
* Stack verification steps:
Expand All @@ -26,14 +26,14 @@ class TestStack extends Stack {
}

const app = new App();
const stack = new TestStack(app, 'cdk-integ-lambda-golang-test-stack');
const stack = new TestStack(app, 'cdk-integ-lambda-golang');

const integTest = new integ.IntegTest(app, 'cdk-integ-lambda-golang', {
const integTest = new integ.IntegTest(app, 'cdk-integ-lambda-golang-al2-integ-test', {
testCases: [stack],
});

const response = integTest.assertions.invokeFunction({
functionName: stack.lambdaFunction.functionName,
});

response.expect(integ.ExpectedResult.exact(256.0));
response.expect(integ.ExpectedResult.exact('256.0'));

0 comments on commit 0a70f0d

Please sign in to comment.