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

ci(cypress): do not overwrite metadata during mca update call #7622

Merged
merged 7 commits into from
Mar 28, 2025

Conversation

arindam-sahoo
Copy link
Contributor

@arindam-sahoo arindam-sahoo commented Mar 25, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

The Connector Update Body is being overwritten, which included the metadata as well. Due to this, if there were any required metadata fields of a connector, then the Connector Update Test would fail.

For example, Braintree connector has a required metadata field, and while testing the Connector Update, just because it was being overwritten by the update-connector-body.json fixture, the test fails as shown in the following screenshot.
image

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

While adding the Card test Flows for the Braintree connector, the Connector Update Test Failed.

How did you test it?

Running the 0000-CoreFlows.cy.js for Braintree connector

image image

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

Copy link

semanticdiff-com bot commented Mar 25, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/fixtures/update-connector-body.json  34% smaller

@arindam-sahoo arindam-sahoo self-assigned this Mar 25, 2025
@arindam-sahoo arindam-sahoo added the A-CI-CD Area: Continuous Integration/Deployment label Mar 25, 2025
@pixincreate
Copy link
Member

how does this change actually fixes things?

when creating the mca, auth is read that includes metadata. and you're passing it. unless the update call nullifies the metadata that is passed in the create call, update call shouldn't fail at all.

i can see that we're overwriting the metadata while making the update call.

try removing the metadata object from cypress-tests/cypress/fixtures/update-connector-body.json and see if that helps.

@arindam-sahoo
Copy link
Contributor Author

Yup, right. My bad, didn't even think that it may be because of the fixtures, making changes.

@arindam-sahoo arindam-sahoo changed the title feat(cypress): enhance connector update command to merge authentication metadata feat(cypress): remove overwriting of metadata in update connector body fixtures Mar 27, 2025
@arindam-sahoo arindam-sahoo changed the title feat(cypress): remove overwriting of metadata in update connector body fixtures refactor(cypress): remove overwriting of metadata in update connector body fixtures Mar 27, 2025
@arindam-sahoo
Copy link
Contributor Author

Changes are done in 0f3bb51 and reverted back the wrongly made changes in 9e61292

@pixincreate pixincreate changed the title refactor(cypress): remove overwriting of metadata in update connector body fixtures ci(cypress): do not overwrite metadata during mca update call Mar 27, 2025
@pixincreate pixincreate added this to the March 2025 Release milestone Mar 27, 2025
@likhinbopanna likhinbopanna added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit 42c225f Mar 28, 2025
16 of 20 checks passed
@likhinbopanna likhinbopanna deleted the connectorupdatecall-enhance branch March 28, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI-CD Area: Continuous Integration/Deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(cypress): connectorUpdateCall fails due to fixtures overwrite
3 participants