Skip to content

Commit

Permalink
fix(AWS API Gateway): Ensure proper apiId resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik committed Nov 10, 2021
1 parent 1829550 commit 95f3a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -150,7 +150,7 @@ async function resolveRestApiId() {
}
const apiName = apiGatewayResource
? apiGatewayResource.Properties.Name
: provider.naming.getApiGatewayName();
: this.provider.naming.getApiGatewayName();
const resolveFromAws = (position) =>
this.provider
.request('APIGateway', 'getRestApis', { position, limit: 500 })
Expand Down
Expand Up @@ -813,7 +813,7 @@ describe('test/unit/lib/plugins/aws/package/compile/events/apiGateway/lib/hack/u
expect(untagResourceStub.args[0][0].tagKeys).to.deep.equal(['keytoremove']);
});

it('should deploys shouldStartNameWithService without apiName', async () => {
it('should correctly resolve `apiId` during deployment', async () => {
const { serviceConfig, servicePath, updateConfig } = await fixtures.setup('apiGateway');
const getDeploymentsStub = sinon.stub().returns({ items: [{ id: 'deployment-id' }] });
const stage = 'dev';
Expand Down

0 comments on commit 95f3a56

Please sign in to comment.