Skip to content

Allow use of CF ImportValue for httpApi id#7905

Merged
medikoo merged 7 commits into
serverless:masterfrom
fredericbarthelet:allow-use-of-import-value-in-http-api
Jul 13, 2020
Merged

Allow use of CF ImportValue for httpApi id#7905
medikoo merged 7 commits into
serverless:masterfrom
fredericbarthelet:allow-use-of-import-value-in-http-api

Conversation

@fredericbarthelet

Copy link
Copy Markdown
Contributor

Closes: #7791

@fredericbarthelet
fredericbarthelet force-pushed the allow-use-of-import-value-in-http-api branch from c811f6f to cb6a91c Compare July 3, 2020 18:12
@codecov-commenter

codecov-commenter commented Jul 3, 2020

Copy link
Copy Markdown

Codecov Report

Merging #7905 into master will decrease coverage by 0.02%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7905      +/-   ##
==========================================
- Coverage   88.30%   88.27%   -0.03%     
==========================================
  Files         244      245       +1     
  Lines        9082     9095      +13     
==========================================
+ Hits         8020     8029       +9     
- Misses       1062     1066       +4     
Impacted Files Coverage Δ
lib/plugins/aws/info/getStackInfo.js 87.75% <57.14%> (-0.62%) ⬇️
lib/plugins/aws/utils/resolveCfImportValue.js 57.14% <57.14%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ffa549...d5431a9. Read the comment docs.

@medikoo medikoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fredericbarthelet! I've proposed some minor improvements, but in general it looks great

Comment thread lib/plugins/aws/info/getStackInfo.js Outdated
Comment thread lib/plugins/aws/info/getStackInfo.js Outdated
Comment on lines +14 to +16
const serverless = new Serverless();
provider = new AwsProvider(serverless, {});
providerStub = sinon.stub(provider, 'request');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not use Serverless and AwsProvider, there's a lot of machinery in them which may introduce side effects.

I would simply inject plain provider object with request method that returns pre-prepared responses.

@fredericbarthelet

Copy link
Copy Markdown
Contributor Author

@medikoo I updated the PR according to your comments. Let me know if it's fine now :)

@fredericbarthelet
fredericbarthelet force-pushed the allow-use-of-import-value-in-http-api branch from fdd3e01 to a4ef428 Compare July 6, 2020 18:11

@medikoo medikoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fredericbarthelet It looks very good. I've just proposed to move one condition into more accurate (logically) point

Comment thread lib/plugins/aws/info/getStackInfo.js Outdated
@fredericbarthelet
fredericbarthelet force-pushed the allow-use-of-import-value-in-http-api branch from a4ef428 to d5431a9 Compare July 11, 2020 13:33
@fredericbarthelet

Copy link
Copy Markdown
Contributor Author

PR updated @medikoo :)

@medikoo medikoo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fredericbarthelet !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow different formats of id in httpApi config

3 participants