Skip to content

Refactor Integration Tests & Organize Imports #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

adamfweidman
Copy link
Collaborator

The integration.spec.ts and integration_server.js are "integration" tests in that they test the code within a mock cloud function environment. This is helpful to make sure that runtime_metadata is present and that http_headers are sent correctly. The current testing can almost entirely be done in the broken_links.spec.ts file, which is where I am migrating the code.
Because in the integration_server the broken_links package is imported as const SyntheticsSdkBrokenLinks = require('synthetics-sdk-broken-links'); it makes code impossible to mock. So in anticipation of my integration with Cloud Storage, where I will need to mock lots of functionality I am moving these tests to broken_links.spec.ts

The cloud Storage integration will be integration tested through CEP workflows.

Also I've reorganized imports

@adamfweidman adamfweidman force-pushed the refactor-integrations branch 2 times, most recently from 4f3568d to 0a02c1a Compare March 6, 2024 18:04
@adamfweidman adamfweidman requested a review from tiffunky March 6, 2024 18:04
@adamfweidman adamfweidman force-pushed the refactor-integrations branch from 0a02c1a to 0bfee9c Compare March 6, 2024 18:18
Copy link
Collaborator

@tiffunky tiffunky left a comment

Choose a reason for hiding this comment

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

lgtm -- could you address the "defined but never used" warnings?

@adamfweidman adamfweidman merged commit c7512c7 into final-blc-storage Mar 8, 2024
@adamfweidman adamfweidman deleted the refactor-integrations branch March 8, 2024 17:19
adamfweidman added a commit that referenced this pull request Mar 20, 2024
adamfweidman added a commit that referenced this pull request Apr 19, 2024
* get-cloud-region (#100)

Add functionality to synthetics-sdk-api to extract cloud region during GCF execution

* stoage proto api (#101)

* expose resolveProjectId (#104)

* update to capture_condition (#109)

* chore(deps): bump ip from 1.1.8 to 1.1.9 (#105)

* chore(deps): bump ip from 1.1.8 to 1.1.9

Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9.
- [Commits](indutny/node-ip@v1.1.8...v1.1.9)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Empty-Commit

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam Weidman <[email protected]>

* add samples tags (#108)

* blc-api-integration-def (#102)

* resolveProjectId present (#106)

* take-screenshots (#107)

* rebase-capture-condition (#110)

* refactor-integrations (#112)

* sanitize strings (#113)

* Take and populate screenshot (#114)

* screenshots-prop

* broken_links.spec working

* fix naming

* pass-args

* response to comments

* change default (#118)

* update synthetics-sdk-api to point to new npm pkg

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
adamfweidman added a commit that referenced this pull request Apr 19, 2024
adamfweidman added a commit that referenced this pull request Apr 19, 2024
* blc-api-integration-def (#102)

* resolveProjectId present (#106)

* take-screenshots (#107)

* rebase-capture-condition (#110)

* refactor-integrations (#112)

* sanitize strings (#113)

* Take and populate screenshot (#114)

* screenshots-prop

* broken_links.spec working

* fix naming

* pass-args

* response to comments

* change default (#118)

* update synthetics-sdk-api to point to new npm pkg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants