-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9502] DST: PITR - Unit Tests for Alter Table Command
Summary: Added Unit Tests in PITR for **Alter Table Add Primary Key** Added a test which does a point in time restore to a point before the alter table add primary key was executed. Post restore validations are done to check if the primary key addition is no longer there. **Alter Table Set Default** Added a test which does a point in time restore to a point before the alter table set default clause was executed. Post restore validations are done to check if the default setting is gone post the PITR. **Alter Table Add Unique Constraint** Added a test which does a point in time restore to a point before the alter table add unique constraint clause was executed. Post restore validations are done to check if the constraint is no longer there after the PITR. **Alter Table Drop Unique Constraint** Added a test which does a point in time restore to the point before dropping the unique constraint and verifies if the unique constraint drop is successfully restored. **Alter Table Drop Constraint** Added a test which does a point in time restore to a point before the alter table drop constraint was executed. Post restore validations are done to check if the constraint is available and if the drop constraint was successfully undone. **Alter Table Drop Default** Added a test which does a point in time restore to a point before the alter table drop default was executed. Post restore validations are done to check if the drop default is undone post PITR. **Alter Table Set Not null** Added a test which does a point in time restore to a point before the alter table set not null clause was executed. Post restore validations are done to check if the not null clause is removed from the column definition. **Alter Table Drop Not null** Added a test which does a point in time restore to a point before the alter table drop not null was executed. Post restore validations are done to check if the not null clause still exists on the column and if the drop is undone successfully via PITR. **Alter Table Add Foreign Key** Added a test which does a point in time restore to a point before the alter table drop add foreign key was executed. Post restore validations are done to check if the foreign key clause still exists on the column and if creation is undone successfully via PITR. **Alter Table Set Owner** Added a test which does a point in time restore to a point before the table ownership was set to a user. Post restore validations are done to check if the table does not belong to the user it was set to. **Alter Table Check Constraint** Added a test which does a point in time restore to a point before the table was altered to include a check constraint on a column. Post restore validations are done to assert that the column does not have the check constraint associated with it. Test Plan: ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlDropCheckConstraint ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlAddUniqueConstraint ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlDropUniqueConstraint ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlAlterTableAddPK ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlDropDefault ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlSetNotNull ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlSetDefault ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlDropNotNull ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlAlterTableSetOwner ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlAlterTableAddFK ./yb_build.sh --cxx-test yb-admin-snapshot-schedule-test --gtest_filter YbAdminSnapshotScheduleTest.PgsqlAddCheckConstraint {F21041} {F21042} {F21043} {F21044} {F21045} {F21046} Reviewers: nmantravadi, bogdan, mkantimath, skedia Reviewed By: mkantimath, skedia Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D14400
- Loading branch information
1 parent
3c93fdf
commit e4fc4dc
Showing
1 changed file
with
388 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters