Skip to content

test(Packaging): Refactor to use runServerless - #8721

Merged
pgrzesik merged 23 commits into
serverless:masterfrom
scadu:ISSUE-8594
Jan 27, 2021
Merged

pgrzesik merged 23 commits into
serverless:masterfrom
scadu:ISSUE-8594

Conversation

@scadu

@scadu scadu commented Jan 6, 2021 •

Copy link
Copy Markdown
Contributor

Closes: #8594

@codecov

codecov Bot commented Jan 6, 2021 •

Copy link
Copy Markdown

Codecov Report

Merging #8721 (b6e1f18) into master (4aa9e18) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8721      +/-   ##
==========================================
+ Coverage   87.74%   87.75%   +0.01%     
==========================================
  Files         264      265       +1     
  Lines        9852     9910      +58     
==========================================
+ Hits         8645     8697      +52     
- Misses       1207     1213       +6     
Impacted Files Coverage Δ
lib/Serverless.js 91.53% <0.00%> (-3.82%) ⬇️
lib/classes/Utils.js 95.74% <0.00%> (-0.56%) ⬇️
lib/cli/resolve-configuration-path.js 96.77% <0.00%> (-0.11%) ⬇️
lib/plugins/aws/deployFunction.js 95.45% <0.00%> (-0.08%) ⬇️
...b/plugins/aws/package/compile/events/cloudFront.js 98.90% <0.00%> (ø)
lib/plugins/aws/package/compile/events/kafka.js 98.24% <0.00%> (ø)
lib/plugins/aws/package/compile/functions.js 96.19% <0.00%> (+0.02%) ⬆️
lib/plugins/aws/provider.js 94.76% <0.00%> (+0.04%) ⬆️
lib/plugins/aws/lib/naming.js 97.71% <0.00%> (+0.08%) ⬆️

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 4aa9e18...b6e1f18. Read the comment docs.

@pgrzesik pgrzesik 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.

Hello @scadu, thanks for submitting your PR 🙇 There are small conflicts between your and master branch, would you be willing to resolve them before review?

@scadu

scadu commented Jan 9, 2021

Copy link
Copy Markdown
Contributor Author

@pgrzesik done.

@scadu
scadu requested a review from pgrzesik January 9, 2021 11:46

@pgrzesik pgrzesik 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.

Thanks @scadu, good job overall! Please see my minor comments and after addressing, we should be good to go 💯

Comment thread test/fixtures/packaging/main.go Resolved
Comment thread test/utils/fs.js Resolved

@pgrzesik pgrzesik 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.

Thanks for submitting changes @scadu. There are a few small things still left - I believe it would be good to remove all // Replaces ... in tests where you implement a new version and remove the old test. In addition, there's now a main binary added to the fixture which I guess ended up there by a mistake.

@scadu
scadu requested a review from pgrzesik January 21, 2021 19:25

@pgrzesik pgrzesik 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 @scadu - great job, I think we're really close to wrapping this up - I have two minor comments, please check them out and let me know what do you think

@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.

@scadu great thanks for that update! In general it's very good, still I needed to update the template as some of the setup was misleading (and this PR needs to also be updated)

e.g. service wide section is meant to test generation of service-wide package, while tests as configured, in all cases inspect artifact of individually packaged function. I've improved the spec at #8822

Let us know

Comment thread test/fixtures/packaging/main.go Resolved
@pgrzesik

Copy link
Copy Markdown
Contributor

Hello @scadu, I've seen that you've pushed new changes - is it ready for re-review or there are still some changes that you'd like to apply before wrapping this up?

@scadu

scadu commented Jan 26, 2021 via email •

Copy link
Copy Markdown
Contributor Author

@pgrzesik

Copy link
Copy Markdown
Contributor

Sure thing, thank you @scadu 🙇

@scadu

scadu commented Jan 26, 2021 •

Copy link
Copy Markdown
Contributor Author

@pgrzesik I've added some tests, however I still have problem with those two:

  • should support functions[].package.individually (service wide) - skipped for now
  • should support package.individually (individually) - also skipped

In both cases I cannot get function's package.artifact from serverless instance as in pre-prepared artifact.

Most probably I miss something obvious again. Brain fog kicked in.

Hopefully we'd be good to merge once it's clarified. Thank you so far your the support - I learned a little about serverless' packaging.

@pgrzesik pgrzesik 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.

It looks great @scadu - let's add that missing assertion for fnService, remove TODOs and unskip the tests and we should be good to go 🙌

@scadu
scadu requested a review from pgrzesik January 27, 2021 15:47

@pgrzesik pgrzesik 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.

Big thanks @scadu for your work on this one 🙇 I know it wasn't the easiest PR to get through the finish line due to various tricky cases but now these tests are really, really solid, thanks to you. Awesome job 🙇

@pgrzesik
pgrzesik merged commit 7ccb176 into serverless:master Jan 27, 2021
@scadu
scadu deleted the ISSUE-8594 branch January 27, 2021 16:34
@medikoo medikoo added the tests label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests: Refactor lib/plugins/package/lib/packageService.test.js

3 participants