Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename aws-lambda-go → aws-lambda-go-alpha #25053

Merged
merged 4 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-cdk.git",
"directory": "packages/@aws-cdk/aws-lambda-go"
"directory": "packages/@aws-cdk/aws-lambda-go-alpha"
},
"scripts": {
"build": "cdk-build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test('bundling', () => {
}),
});

expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(/aws-lambda-go\/lib$/), expect.objectContaining({
expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(/aws-lambda-go-alpha\/lib$/), expect.objectContaining({
buildArgs: expect.objectContaining({
IMAGE: expect.stringMatching(/build-go/),
}),
Expand Down Expand Up @@ -162,7 +162,7 @@ test('with Docker build args', () => {
HELLO: 'WORLD',
},
});
expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(/aws-lambda-go\/lib$/), expect.objectContaining({
expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(/aws-lambda-go-alpha\/lib$/), expect.objectContaining({
buildArgs: expect.objectContaining({
HELLO: 'WORLD',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ test('GoFunction with defaults', () => {
});

expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
entry: expect.stringMatching(/aws-lambda-go\/test\/lambda-handler-vendor\/cmd\/api$/),
entry: expect.stringMatching(/aws-lambda-go-alpha\/test\/lambda-handler-vendor\/cmd\/api$/),
}));

Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
Expand All @@ -48,7 +48,7 @@ test('GoFunction with using provided runtime', () => {
});

expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
entry: expect.stringMatching(/aws-lambda-go\/test\/lambda-handler-vendor\/cmd\/api$/),
entry: expect.stringMatching(/aws-lambda-go-alpha\/test\/lambda-handler-vendor\/cmd\/api$/),
}));

Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
Expand All @@ -65,7 +65,7 @@ test('GoFunction with using golang runtime', () => {
});

expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
entry: expect.stringMatching(/aws-lambda-go\/test\/lambda-handler-vendor\/cmd\/api$/),
entry: expect.stringMatching(/aws-lambda-go-alpha\/test\/lambda-handler-vendor\/cmd\/api$/),
}));

Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
Expand Down Expand Up @@ -106,7 +106,7 @@ test('resolves entry to an absolute path', () => {
});

expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
entry: expect.stringMatching(/aws-lambda-go\/test\/lambda-handler-vendor\/cmd\/api\/main.go$/),
entry: expect.stringMatching(/aws-lambda-go-alpha\/test\/lambda-handler-vendor\/cmd\/api\/main.go$/),
}));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ beforeEach(() => {

describe('findUp', () => {
test('Starting at process.cwd()', () => {
expect(findUp('README.md')).toMatch(/aws-lambda-go\/README.md$/);
expect(findUp('README.md')).toMatch(/aws-lambda-go-alpha\/README.md$/);
});

test('Non existing file', () => {
expect(findUp('non-existing-file.unknown')).toBe(undefined);
});

test('Starting at a specific path', () => {
expect(findUp('util.test.ts', path.join(__dirname, 'integ-handlers'))).toMatch(/aws-lambda-go\/test\/util.test.ts$/);
expect(findUp('util.test.ts', path.join(__dirname, 'integ-handlers'))).toMatch(/aws-lambda-go-alpha\/test\/util.test.ts$/);
});

test('Non existing file starting at a non existing relative path', () => {
expect(findUp('not-to-be-found.txt', 'non-existing/relative/path')).toBe(undefined);
});

test('Starting at a relative path', () => {
expect(findUp('util.test.ts', 'test/integ-handlers')).toMatch(/aws-lambda-go\/test\/util.test.ts$/);
expect(findUp('util.test.ts', 'test/integ-handlers')).toMatch(/aws-lambda-go-alpha\/test\/util.test.ts$/);
});
});

Expand Down