Commit fccf074
authored
Fix integration test failing on first Dependabot PR run (#692)
Fix integration test failing on first Dependabot PR run
When custom Lambda layers are defined, Serverless Framework calls
CloudFormation.describeStacks in compareWithLastLayer() to check
whether the layer has already been uploaded. Its error handler only
silences "does not exist" responses; any other error – including the
"security token invalid" response AWS returns when credentials are
absent – is re-thrown, failing sls package.
Add a lightweight test-only Serverless plugin (offline.js) that
intercepts CloudFormation.describeStacks during packaging and returns
a synthetic "does not exist" error. This makes compareWithLastLayer
treat every run as a fresh stack, which is the correct behaviour for
snapshot tests where we never actually deploy. The snapshot output is
unchanged because S3 key timestamps are already normalised.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update integration_tests/offline.js
Co-authored-by: Ava Silver <ava.silver@datadoghq.com>
Co-authored-by: yiming.luo <yiming.luo@datadoghq.com>1 parent a812da7 commit fccf074
2 files changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments