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-17183. add Advanced test for BigQuery. WIP. #290

Merged
merged 12 commits into from
Apr 17, 2024
2 changes: 1 addition & 1 deletion .github/workflows/test-harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
strategy:
max-parallel: 1
matrix:
liquibase-support-level: [Contributed, Foundational] # Define the different test levels to run
liquibase-support-level: [Contributed, Foundational, Advanced] # Define the different test levels to run
fail-fast: false # Set fail-fast to false to run all test levels even if some of them fail
env:
github-token: ${{ secrets.LIQUIBOT_PAT_GPM_ACCESS }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Reference Database: @ jdbc:bigquery://https://console.cloud.google.com/bigquery;ProjectId=testautomation-370822;OAuthType=1;DefaultDataset=tatiana_testing; (Default Schema: tatiana_testing)
Comparison Database: @ jdbc:bigquery://https://console.cloud.google.com/bigquery;ProjectId=testautomation-370822;OAuthType=1;DefaultDataset=tatiana_alternate_ds; (Default Schema: tatiana_alternate_ds)
Compared Schemas: tatiana_testing -> tatiana_alternate_ds
Product Name: EQUAL
Product Version: EQUAL
Missing Catalog(s): NONE
Unexpected Catalog(s): NONE
Changed Catalog(s): NONE
Missing Column(s):
tatiana_testing.test_table.dateColumn
tatiana_testing.test_table.intColumn
tatiana_testing.test_table.test_column
tatiana_testing.test_table_xml.test_column
tatiana_testing.test_table.varcharColumn
Unexpected Column(s):
tatiana_alternate_ds.test_table_secondary.test_column
tatiana_alternate_ds.test_table_secondary.varcharColumn
Changed Column(s): NONE
Missing Foreign Key(s): NONE
Unexpected Foreign Key(s): NONE
Changed Foreign Key(s): NONE
Missing Index(s): NONE
Unexpected Index(s): NONE
Changed Index(s): NONE
Missing Primary Key(s): NONE
Unexpected Primary Key(s): NONE
Changed Primary Key(s): NONE
Missing Schema(s): NONE
Unexpected Schema(s): NONE
Changed Schema(s): NONE
Missing Sequence(s): NONE
Unexpected Sequence(s): NONE
Changed Sequence(s): NONE
Missing Table(s):
test_table
test_table_xml
Unexpected Table(s):
test_table_secondary
Changed Table(s): NONE
Missing Unique Constraint(s): NONE
Unexpected Unique Constraint(s): NONE
Changed Unique Constraint(s): NONE
Missing View(s): NONE
Unexpected View(s): NONE
Changed View(s): NONE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE test_table (test_column INT64, varcharColumn STRING(25)INITIAL_VALUE, intColumn INT645, dateColumn date'2020-09-21');
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE test_table_xml (test_column INT64);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE `harness_test_ds.test_table` (test_column INT);
ALTER TABLE `harness_test_ds.test_table` ADD COLUMN varcharColumn STRING(25), ADD COLUMN intColumn INT, ADD COLUMN dateColumn date;
ALTER TABLE `harness_test_ds.test_table` ALTER COLUMN varcharColumn SET DEFAULT 'INITIAL_VALUE';
ALTER TABLE `harness_test_ds.test_table` ALTER COLUMN intColumn SET DEFAULT 5;
ALTER TABLE `harness_test_ds.test_table` ALTER COLUMN dateColumn SET DEFAULT '2020-09-21';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE `harness_test_ds.test_table_xml` (test_column INT);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `harness_test_ds.test_table` ADD COLUMN varcharColumn STRING(50);
ALTER TABLE `harness_test_ds.test_table` ALTER COLUMN varcharColumn SET DEFAULT 'DIFFERENT_VALUE';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE TABLE `harness_test_ds.test_table_secondary` (test_column INT);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--liquibase formatted sql

--changeset as:1
CREATE TABLE test_table_xml (test_column INT64);

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<!-- NOT SUPPORTED BY BIGQUERY-->
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<!-- NOT SUPPORTED BY BIGQUERY-->
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<!-- NOT SUPPORTED BY BIGQUERY-->
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
<!-- NOT SUPPORTED BY BIGQUERY-->
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "test_table"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"name": "test_column",
"nullable": true,
"type": {
"typeName": "INT64"
}
}
},
{
"column": {
"name": "varcharColumn",
"nullable": true,
"type": {
"typeName": "STRING"
}
}
},
{
"column": {
"name": "intColumn",
"nullable": true,
"type": {
"typeName": "INT64"
}
}
},
{
"column": {
"name": "dateColumn",
"nullable": true,
"type": {
"typeName": "DATE"
}
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"snapshot": {
"objects": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"snapshot": {
"objects": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"snapshot": {
"objects": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"snapshot": {
"objects": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Table": [
{
"table": {
"name": "snapshot_test_table"
}
}
],
"liquibase.structure.core.Column": [
{
"column": {
"name": "snapshot_test_column",
"type": {
"typeName": "INT64"
}
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"snapshot": {
"objects": {
"liquibase.structure.core.Catalog": [
{
"catalog": {
"name": "testharnesstests"
}
}
],
"liquibase.structure.core.Schema": [
{
"schema": {
"name": "harness_test_ds"
}
}
]
}
}
}
Loading