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

Integration test for Foreign Key Action Migration Feature #874

Merged

Conversation

aasthabharill
Copy link
Collaborator

@aasthabharill aasthabharill commented Jul 18, 2024

Integration tests for MySQL and PostgreSQL are added for direct database connection and dumpfile to check if foreign key actions are being translated to Spanner dialects correctly.

The translated Spanner database is queried and a row in the parent table is deleted. Then the child row can be checked for the appropriate action - in case of ON DELETE NO ACTION, both the parent and child row should be retained and deletion should fail, and for ON DELETE CASCADE, the child row should be automatically deleted after deletion of the parent row

@aasthabharill aasthabharill requested a review from a team as a code owner July 18, 2024 14:37
@aasthabharill aasthabharill requested review from Deep1998 and bharadwaj-aditya and removed request for a team July 18, 2024 14:37
testing/postgres/integration_test.go Outdated Show resolved Hide resolved
testing/postgres/integration_test.go Outdated Show resolved Hide resolved
testing/mysql/integration_test.go Outdated Show resolved Hide resolved
testing/mysql/integration_test.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@shreyakhajanchi shreyakhajanchi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@Deep1998 Deep1998 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

codecov bot commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.06%. Comparing base (adc87df) to head (a901228).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #874      +/-   ##
==========================================
- Coverage   46.06%   46.06%   -0.01%     
==========================================
  Files         166      166              
  Lines       21704    21704              
  Branches      515      515              
==========================================
- Hits         9999     9997       -2     
- Misses      11136    11138       +2     
  Partials      569      569              
Components Coverage Δ
backend-apis 45.42% <ø> (ø)
backend-library 52.18% <ø> (ø)
cli 5.14% <ø> (ø)
frontend 33.90% <ø> (-0.06%) ⬇️

see 1 file with indirect coverage changes

@Deep1998 Deep1998 merged commit 023fb63 into GoogleCloudPlatform:master Jul 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants