Skip to content

chore(lambda-nodejs): fix test broken in CodeBuild#17884

Merged
mergify[bot] merged 1 commit intomasterfrom
njlynch/fix-lambda-nodejs-fail
Dec 7, 2021
Merged

chore(lambda-nodejs): fix test broken in CodeBuild#17884
mergify[bot] merged 1 commit intomasterfrom
njlynch/fix-lambda-nodejs-fail

Conversation

@njlynch
Copy link
Copy Markdown
Contributor

@njlynch njlynch commented Dec 7, 2021

This test fails in our CodeBuild environment with the following error:

FAIL test/util.test.js
  ● extractDependencies › with file dependency
    expect(received).toEqual(expected) // deep equality
    - Expected  - 1
    + Received  + 1
      Object {
    -   "my-module": StringMatching /aws-cdk\/packages\/@aws-cdk\/core/,
    +   "my-module": "file:/codebuild/output/src777018412/src/packages/@aws-cdk/core",
      }
      130 |     }));
      131 |
    > 132 |     expect(extractDependencies(pkgPath, ['my-module'])).toEqual({
          |                                                         ^
      133 |       'my-module': expect.stringMatching(/aws-cdk\/packages\/@aws-cdk\/core/),
      134 |     });
      135 |
      at Object.<anonymous> (test/util.test.ts:132:57)

This is due to the source being located in .../src instead of .../aws-cdk. Fix
the test by stopping the check at the 'packages' directory.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

This test fails in our CodeBuild environment with the following error:

```
FAIL test/util.test.js
  ● extractDependencies › with file dependency
    expect(received).toEqual(expected) // deep equality
    - Expected  - 1
    + Received  + 1
      Object {
    -   "my-module": StringMatching /aws-cdk\/packages\/@aws-cdk\/core/,
    +   "my-module": "file:/codebuild/output/src777018412/src/packages/@aws-cdk/core",
      }
      130 |     }));
      131 |
    > 132 |     expect(extractDependencies(pkgPath, ['my-module'])).toEqual({
          |                                                         ^
      133 |       'my-module': expect.stringMatching(/aws-cdk\/packages\/@aws-cdk\/core/),
      134 |     });
      135 |
      at Object.<anonymous> (test/util.test.ts:132:57)
 ```

This is due to the source being located in .../src instead of .../aws-cdk. Fix
the test by stopping the check at the 'packages' directory.
@njlynch njlynch requested a review from a team December 7, 2021 13:07
@njlynch njlynch self-assigned this Dec 7, 2021
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Dec 7, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 7, 2021
@njlynch
Copy link
Copy Markdown
Contributor Author

njlynch commented Dec 7, 2021

@Mergifyio backport v2-main

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 7, 2021

backport v2-main

🟠 Waiting for conditions to match

Details
  • merged [:pushpin: backport requirement]

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 8d83c97
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit d5c249f into master Dec 7, 2021
@mergify mergify bot deleted the njlynch/fix-lambda-nodejs-fail branch December 7, 2021 13:53
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 7, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify bot pushed a commit that referenced this pull request Dec 7, 2021
This test fails in our CodeBuild environment with the following error:

```
FAIL test/util.test.js
  ● extractDependencies › with file dependency
    expect(received).toEqual(expected) // deep equality
    - Expected  - 1
    + Received  + 1
      Object {
    -   "my-module": StringMatching /aws-cdk\/packages\/@aws-cdk\/core/,
    +   "my-module": "file:/codebuild/output/src777018412/src/packages/@aws-cdk/core",
      }
      130 |     }));
      131 |
    > 132 |     expect(extractDependencies(pkgPath, ['my-module'])).toEqual({
          |                                                         ^
      133 |       'my-module': expect.stringMatching(/aws-cdk\/packages\/@aws-cdk\/core/),
      134 |     });
      135 |
      at Object.<anonymous> (test/util.test.ts:132:57)
 ```

This is due to the source being located in .../src instead of .../aws-cdk. Fix
the test by stopping the check at the 'packages' directory.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*

(cherry picked from commit d5c249f)
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Dec 7, 2021

backport v2-main

✅ Backports have been created

Details

mergify bot added a commit that referenced this pull request Dec 7, 2021
…17885)

This is an automatic backport of pull request #17884 done by [Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
This test fails in our CodeBuild environment with the following error:

```
FAIL test/util.test.js
  ● extractDependencies › with file dependency
    expect(received).toEqual(expected) // deep equality
    - Expected  - 1
    + Received  + 1
      Object {
    -   "my-module": StringMatching /aws-cdk\/packages\/@aws-cdk\/core/,
    +   "my-module": "file:/codebuild/output/src777018412/src/packages/@aws-cdk/core",
      }
      130 |     }));
      131 |
    > 132 |     expect(extractDependencies(pkgPath, ['my-module'])).toEqual({
          |                                                         ^
      133 |       'my-module': expect.stringMatching(/aws-cdk\/packages\/@aws-cdk\/core/),
      134 |     });
      135 |
      at Object.<anonymous> (test/util.test.ts:132:57)
 ```

This is due to the source being located in .../src instead of .../aws-cdk. Fix
the test by stopping the check at the 'packages' directory.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@aws-cdk/aws-lambda-nodejs contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants