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

DAT-14478. replaced AdvancedHarnessSuiteTest with LiquibaseHarnessSuiteTest as a default test suite. Fixes in test data for mssql:gcp. #539

Merged
merged 13 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ on:
databases:
description: Databases to start up. Comma separated list of "name:version"
required: true
default: "[\"postgresql:11\",\"postgresql:12\",\"postgresql:13\",\"postgresql:14\",\"mysql:gcp\",\"mssql:2019\"]"
default: "[\"postgresql:11\",\"postgresql:12\",\"postgresql:13\",\"postgresql:14\",\"mysql:gcp\",\"mssql:gcp\"]"

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
databases: ${{ github.event.inputs.databases || '["postgresql:11","postgresql:12","postgresql:13","postgresql:14","mysql:gcp","mssql:2019"]' }}
databases: ${{ github.event.inputs.databases || '["postgresql:11","postgresql:12","postgresql:13","postgresql:14","mysql:gcp","mssql:gcp"]' }}
testClasses: ${{ inputs.testClasses || 'LiquibaseHarnessSuiteTest' }}
steps:
- name: Checkout
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
if: ${{ steps.setup.outputs.databasePlatform == 'mssql' }}
with:
operation: "update"
classpath: "src/test/resources/init-changelogs/aws"
classpath: "src/test/resources/init-changelogs/gcp"
changeLogFile: "mssql.sql"
username: "${{secrets.TH_DB_ADMIN}}"
password: "${{secrets.TH_DB_PASSWD}}"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IF EXISTS( SELECT extended_properties.value FROM SYS.EXTENDED_PROPERTIES WHERE major_id = OBJECT_ID('lbuser.authors') AND name = N'MS_DESCRIPTION' AND minor_id = ( SELECT column_id FROM SYS.COLUMNS WHERE name = 'id' AND object_id = OBJECT_ID('lbuser.authors')) ) BEGIN EXEC sys.sp_updateextendedproperty @name = N'MS_Description' , @value = N'A Test Column Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' , @level2type = N'COLUMN' , @level2name = N'id' END ELSE BEGIN EXEC sys.sp_addextendedproperty @name = N'MS_Description' , @value = N'A Test Column Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' , @level2type = N'COLUMN' , @level2name = N'id' END
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IF EXISTS( SELECT extended_properties.value FROM SYS.EXTENDED_PROPERTIES WHERE major_id = OBJECT_ID('lbuser.authors') AND name = N'MS_DESCRIPTION' AND minor_id = 0 ) BEGIN EXEC sys.sp_updateextendedproperty @name = N'MS_Description' , @value = N'A Test Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' END ELSE BEGIN EXEC sys.sp_addextendedproperty @name = N'MS_Description' , @value = N'A Test Remark' , @level0type = N'SCHEMA' , @level0name = N'lbuser' , @level1type = N'TABLE' , @level1name = N'authors' END
2 changes: 1 addition & 1 deletion src/test/resources/harness-config-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ databasesUnderTest:

- name: mssql
prefix: gcp
version: 2019
version: gcp
url: DBENDPOINT
username: USERNAME
password: PASSWORD
Expand Down
39 changes: 39 additions & 0 deletions src/test/resources/init-changelogs/gcp/mssql.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--liquibase formatted sql
--changeset liquibase:1 runAlways:true

DROP TABLE IF EXISTS [lbuser].[authors]

CREATE TABLE [lbuser].[authors](
[id] [int] NOT NULL,
[first_name] [varchar](255) NOT NULL,
[last_name] [varchar](255) NULL,
[email] [varchar](100) NULL,
[birthdate] [varchar](255) NULL,
[added] [datetime] NOT NULL,
CONSTRAINT [PK_PrimaryKey] PRIMARY KEY ([id])
) ON [PRIMARY]

INSERT INTO [lbuser].[authors] ([id],[first_name],[last_name],[email],[birthdate],[added])
VALUES ('1','Eileen','Lubowitz','ppaucek@example.org','1991-03-04','2004-05-30 02:08:25'),
('2','Tamia','Mayert','shansen@example.org','2016-03-27','2014-03-21 02:52:00'),
('3','Cyril','Funk','reynolds.godfrey@example.com','1988-04-21','2011-06-24 18:17:48'),
('4','Nicolas','Buckridge','xhoeger@example.net','2017-02-03','2019-04-22 02:04:41'),
('5','Jayden','Walter','lillian66@example.com','2010-02-27','1990-02-04 02:32:00')

DROP TABLE IF EXISTS [lbuser].[posts]

CREATE TABLE [lbuser].[posts](
[id] [int] NOT NULL,
[author_id] [int] NOT NULL,
[title] [varchar](255) NULL,
[description] [varchar](255) NULL,
[content] [varchar](255) NULL,
[inserted_date] [date] NULL
) ON [PRIMARY]

INSERT INTO [lbuser].[posts] ([id],[author_id],[title],[description],[content],[inserted_date])
VALUES ('1','1','temporibus','voluptatum','Fugit non et doloribus repudiandae.','2015-11-18'),
('2','2','ea','aut','Tempora molestias maiores provident molestiae sint possimus quasi.','1975-06-08'),
('3','3','illum','rerum','Delectus recusandae sit officiis dolor.','1975-02-25'),
('4','4','itaque','deleniti','Magni nam optio id recusandae.','2010-07-28'),
('5','5','ad','similique','Rerum tempore quis ut nesciunt qui excepturi est.','2006-10-09')