Skip to content
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

feat(schematic): integration testing #2398

Conversation

andrewelamb
Copy link
Contributor

@andrewelamb andrewelamb commented Dec 7, 2023

This PR:

  • fixes fds-1288
  • fixes fds-1288
  • PRs are now done from forks to Schematic-API-Staging instead of main
  • PRs to Schematic-API-Staging only trigger tests that don't require secrets
  • PR's are then don form Schematic-API-Staging to Main
  • A new workflow that triggers when PRs are done from Schematic-API-Staging to Main that runs all tests has been added
  • All non synapse tests are not mocked at all
  • A new set of tests test_synapse_endpoints.py has tests for all synapse endpoints where nothign is mocked
  • handle_exceptions is now tested directly
  • When the schema url isn't correct an InavlidSchemaURL exception is now raised
  • handle exceptions returns a 404 status when InavlidSchemaURL is caught

@andrewelamb andrewelamb changed the title Fds 1284 testing eat(schematic): integration testing Dec 7, 2023
@andrewelamb andrewelamb changed the title eat(schematic): integration testing feat(schematic): integration testing Dec 7, 2023
@andrewelamb andrewelamb marked this pull request as draft December 7, 2023 17:14
@andrewelamb andrewelamb marked this pull request as ready for review December 7, 2023 19:01
@andrewelamb
Copy link
Contributor Author

@GiaJordan @linglp Could I get one of you to review this?

@GiaJordan
Copy link

@andrewelamb yes, I'll take a look
cc @linglp

@andrewelamb andrewelamb merged commit e82e87f into Sage-Bionetworks:Schematic-API-Staging Dec 8, 2023
7 checks passed
andrewelamb added a commit that referenced this pull request Dec 15, 2023
* feat(schematic): integration testing (#2398)

* changed authenticication so that only endpoints that need it have it

* updated schematic

* add patch for access token

* schema endpoints no longer mockeed

* added tests for handle exceptions

* added integration tests

* marked synapse tests

* added error handling for bad schema urls

* fix error message

* add workflow for end to end testing

* fix some test results

* add unit mark

* add unit mark

* add workflow for testing with secrets

* rename file

* fix synapse test file when secrets file doesnt exists

* fix test workflows

* turned synapse ids into secrets in workflow

* turned synapse ids into secrets in workflow

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml
andrewelamb added a commit that referenced this pull request Jan 17, 2024
* feat(schematic): integration testing (#2398)

* changed authenticication so that only endpoints that need it have it

* updated schematic

* add patch for access token

* schema endpoints no longer mockeed

* added tests for handle exceptions

* added integration tests

* marked synapse tests

* added error handling for bad schema urls

* fix error message

* add workflow for end to end testing

* fix some test results

* add unit mark

* add unit mark

* add workflow for testing with secrets

* rename file

* fix synapse test file when secrets file doesnt exists

* fix test workflows

* turned synapse ids into secrets in workflow

* turned synapse ids into secrets in workflow

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* add paging, and split connected noeds into two endpoints

* paginated preoject datasets query

* paginated preoject datasets query

* paginated dataset files endpoint

* pagniate project manifests endpoint

* paginate get node dependencies

* paginate get node dependencies

* paginate node properties endpoint

* paginate validation rules endpoint

* paginate get projects endpoint

* unpaginate node properties and validation rules endpoints

* unpaginate node properties and validation rules endpoints
andrewelamb added a commit that referenced this pull request Jan 17, 2024
* feat(schematic): integration testing (#2398)

* changed authenticication so that only endpoints that need it have it

* updated schematic

* add patch for access token

* schema endpoints no longer mockeed

* added tests for handle exceptions

* added integration tests

* marked synapse tests

* added error handling for bad schema urls

* fix error message

* add workflow for end to end testing

* fix some test results

* add unit mark

* add unit mark

* add workflow for testing with secrets

* rename file

* fix synapse test file when secrets file doesnt exists

* fix test workflows

* turned synapse ids into secrets in workflow

* turned synapse ids into secrets in workflow

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* add paging, and split connected noeds into two endpoints

* paginated preoject datasets query

* paginated preoject datasets query

* paginated dataset files endpoint

* pagniate project manifests endpoint

* paginate get node dependencies

* paginate get node dependencies

* paginate node properties endpoint

* paginate validation rules endpoint

* paginate get projects endpoint

* unpaginate node properties and validation rules endpoints

* unpaginate node properties and validation rules endpoints
andrewelamb added a commit that referenced this pull request Jan 26, 2024
* feat(schematic): integration testing (#2398)

* changed authenticication so that only endpoints that need it have it

* updated schematic

* add patch for access token

* schema endpoints no longer mockeed

* added tests for handle exceptions

* added integration tests

* marked synapse tests

* added error handling for bad schema urls

* fix error message

* add workflow for end to end testing

* fix some test results

* add unit mark

* add unit mark

* add workflow for testing with secrets

* rename file

* fix synapse test file when secrets file doesnt exists

* fix test workflows

* turned synapse ids into secrets in workflow

* turned synapse ids into secrets in workflow

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* add paging, and split connected noeds into two endpoints

* paginated preoject datasets query

* paginated preoject datasets query

* paginated dataset files endpoint

* pagniate project manifests endpoint

* paginate get node dependencies

* paginate get node dependencies

* paginate node properties endpoint

* paginate validation rules endpoint

* paginate get projects endpoint

* update schematic and other packages

* remove uneeded type ignores

* added generate manifest endpoints

* temp commit

* delete manifest file

* add generate manifest endpoint

* fix broken tests
andrewelamb added a commit that referenced this pull request Jan 26, 2024
* feat(schematic): integration testing (#2398)

* changed authenticication so that only endpoints that need it have it

* updated schematic

* add patch for access token

* schema endpoints no longer mockeed

* added tests for handle exceptions

* added integration tests

* marked synapse tests

* added error handling for bad schema urls

* fix error message

* add workflow for end to end testing

* fix some test results

* add unit mark

* add unit mark

* add workflow for testing with secrets

* rename file

* fix synapse test file when secrets file doesnt exists

* fix test workflows

* turned synapse ids into secrets in workflow

* turned synapse ids into secrets in workflow

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* Update schematic-api-ci.yml

* add paging, and split connected noeds into two endpoints

* paginated preoject datasets query

* paginated preoject datasets query

* paginated dataset files endpoint

* pagniate project manifests endpoint

* paginate get node dependencies

* paginate get node dependencies

* paginate node properties endpoint

* paginate validation rules endpoint

* paginate get projects endpoint

* update schematic and other packages

* remove uneeded type ignores

* added generate manifest endpoints

* temp commit

* delete manifest file

* add generate manifest endpoint

* fix broken tests

* ci(sage-monorepo): create a GH composite action to setup the dev container (#2438)

* Create a composite action to setup the dev container

* Add shell

* Add shell

* Fix indent

* Add shell

* Temporarily comment out sonar scan for pushes to main (#2443)

* Touch one file (#2444)

* Restore sonar scan in CI workflow (#2446)

* Undo openchallenges-app touch (#2447)

* Add name when running `.github/actions/setup-dev-container` (#2451)

* ci(sage-monorepo): experiment with `pull_request_target` (#2453)

* Add ssonar scan workflow

* Check if secret can be read

* ci(sage-monorepo): try sonar scan trigger (#2454)

* Touch OC app file

* Update workflow to run sonar scans

* ci(sage-monorepo): test sonar scan from PR from fork (#2455)

* Touch OC web app

* Touch the file again

* Fetch correct branch

* Undo changes to web app

* ci(sage-monorepo): try new sonar scan workflow for PRs (#2456)

* Touch oc web app

* Update sonar scan workflow

* ci(sage-monorepo): try sonar scan workflow triggered by fork PR (#2457)

* Touch OC web app

* Trigger again the workflow

* Create prototype of new sonar scanner for pr

* Cleanup

* Cleanup

* Update scanner parameters

* Disable sonar scanner in main CI workflow

* ci(sage-monorepo): parametrize sonar scanner tool (#2458)

* Touch oc web app

* Ignore .nx

* Save before trying Bard suggestion

* Upgrade sonar scanner to support PR

* Simplify command

* Cleanpu

* Set working dir

* Specify PR number to SonarScanner for Gradle

* Remove scanner tool proto

* Sort Ci env vars in alphanum

* Update message

* ci(sage-monorepo): fix how env vars are passed to the dev container (#2459)

* Touch two projects with scanner

* Pass env var to CI

* Add SONAR_PULL_REQUEST_NUMBER to dev container definition

* ci(sage-monorepo): try sonar scan again for PRs originating from forks (#2460)

* Touch two OC projects

* Require label `sonar-scan-appproved` to run Sonar

* Remove hard coded PR number

* ci(sage-monorepo): test Sonar workflow with label-based approval (#2461)

* Touch two oc projects

* Throw error if sonar label is missing

* Update mesage

* Touch two oc projects (#2462)

---------

Co-authored-by: Thomas Schaffter <[email protected]>
@andrewelamb andrewelamb deleted the fds-1284-testing branch January 29, 2024 20:09
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.

3 participants