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-19145 Basic template to setup Informix #933

Merged
merged 36 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fb25bfd
DAT-19145 Basic template to setup Informix
rberezen Dec 6, 2024
c842bf1
Added docker config
rberezen Dec 6, 2024
2789879
Added informix to the db matrix
rberezen Dec 6, 2024
cb67719
Added informix to the list of default dbs
rberezen Dec 6, 2024
0633594
More changes
rberezen Dec 6, 2024
eb8cc33
Fixed formatting
rberezen Dec 6, 2024
528a748
Added healthcheck
rberezen Dec 6, 2024
c9e61c7
Reverted src/test/resources/H2/lbcat.mv.db to the state from commit 1…
rberezen Dec 6, 2024
bcf7f2f
Used INIT_FILE: "informix-init.sql"
rberezen Dec 7, 2024
20a22bd
Changed db to testdb
rberezen Dec 7, 2024
19e667d
changed healthcheck
rberezen Dec 7, 2024
4b4ae29
ANother try
rberezen Dec 7, 2024
cfa5467
Added 12 and 14 versions
rberezen Dec 9, 2024
dd9a372
Fixed typo
rberezen Dec 9, 2024
6a93177
Adjusted to run informix docker for v12
rberezen Dec 9, 2024
c940101
Added back v14 docker setup
rberezen Dec 9, 2024
512697b
DAT-19146 fixing informix tests. Some tests are still failing, see pr…
Tamelianovych Dec 11, 2024
f683dba
DAT-19146 removed extra dependency
Tamelianovych Dec 11, 2024
4f57c07
DAT-19146 test volume informix db
Tamelianovych Dec 11, 2024
e2281bd
DAT-19146 test volume informix db
Tamelianovych Dec 11, 2024
1283591
DAT-19146 fixing tests
Tamelianovych Dec 12, 2024
9f26e65
DAT-19146 fixing tests
Tamelianovych Dec 13, 2024
943b1c6
script fix
rberezen Dec 13, 2024
9febbbf
Merge remote-tracking branch 'origin/DAT-19145' into DAT-19146
Tamelianovych Dec 16, 2024
0b4313c
DAT-19146 changes after code review
Tamelianovych Dec 16, 2024
d55db91
DAT-19146 fixing compose file
Tamelianovych Dec 16, 2024
0993242
DAT-19146 fixing script
Tamelianovych Dec 16, 2024
0084fe8
DAT-19146 fixing two tests
Tamelianovych Dec 16, 2024
7efe1e0
DAT-19146 fixing script
Tamelianovych Dec 16, 2024
0568e55
DAT-19146 fixing script
Tamelianovych Dec 16, 2024
44cbaeb
DAT-19146 fixing load data tests
Tamelianovych Dec 16, 2024
91cd699
Merge branch 'main' into DAT-19145
PavloTytarchuk Dec 17, 2024
57d5d9a
Merge branch 'DAT-19145' into DAT-19146
PavloTytarchuk Dec 17, 2024
22375d8
Merge pull request #935 from liquibase/DAT-19146
Tamelianovych Dec 17, 2024
0b8132d
DAT-19146-related adding ticket numbers to info
Tamelianovych Dec 17, 2024
7ae57ce
Merge branch 'main' into DAT-19145
Tamelianovych Dec 17, 2024
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
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ on:
"hsqldb-2.5",
"firebird-3",
"firebird-4",
"db2-luw"
"db2-luw",
"informix"
]

jobs:
Expand All @@ -118,7 +119,7 @@ jobs:
"postgres-12","postgres-13","postgres-14","postgres-15","postgres-16","mariadb-10.2","mariadb-10.3","mariadb-10.4","mariadb-10.5","mariadb-10.6",
"mariadb-10.7","mssql-2017","mssql-2019","mssql-2022","H2Database-2.2","crdb-23.1","crdb-23.2","crdb-24.1",
"edb-postgres-12","edb-postgres-13","edb-postgres-14","edb-postgres-15","edb-postgres-16",
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw"]' }}
"edb-edb-12","edb-edb-13","edb-edb-14","edb-edb-15","edb-edb-16","derby","sqlite","hsqldb-2.4","hsqldb-2.5","firebird-3","firebird-4","db2-luw","informix"]' }}
testClasses: ${{ inputs.testClasses || 'LiquibaseHarnessSuiteTest' }}
steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@
<artifactId>mssql-jdbc</artifactId>
<version>12.8.1.jre11</version>
</dependency>
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>jdbc</artifactId>
<version>4.50.11</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class FoundationalTest extends Specification {
if (shouldOpenNewConnection(connection, "sqlite")) {
newConnection = DriverManager.getConnection(testInput.url, testInput.username, testInput.password)
resultSet = newConnection.createStatement().executeQuery("SELECT * FROM DATABASECHANGELOG")
} else if (shouldOpenNewConnection(connection, "informix")) {
resultSet = ((JdbcConnection) connection).createStatement().executeQuery("SELECT * FROM DATABASECHANGELOG")
} else {
resultSet = ((JdbcConnection) connection).createStatement().executeQuery("SELECT * FROM DATABASECHANGELOG")
connection.autoCommit ?: connection.commit()
Expand Down
Binary file removed src/test/resources/H2/lbcat.mv.db
Binary file not shown.
7 changes: 5 additions & 2 deletions src/test/resources/automation-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,13 @@ case $db in
test_command mvn -ntp -Dtest=$tc -DdbName=firebird -DdbVersion=4 test
;;
"db2-luw")
test_command mvn -ntp -Dtest=$tc -DdbName=db2-luw test
;;
test_command mvn -ntp -Dtest=$tc -DdbName=db2-luw test
;;
"snowflake")
test_command mvn -ntp -Dtest=$tc -DdbName=snowflake -DrollbackStrategy=rollbackByTag test
;;
"informix")
test_command mvn -ntp -Dtest=$tc -DdbName=informix test
;;
esac

21 changes: 21 additions & 0 deletions src/test/resources/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,27 @@ services:
depends_on:
- crdb-24.1

informix:
image: icr.io/informix/informix-developer-database:latest
container_name: informix-db
hostname: ifx
ports:
- "9088:9088"
environment:
LICENSE: "accept"
restart: always
privileged: true
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9088" ]
interval: 10s
timeout: 5s
retries: 6
start_period: 30s
#volumes:
#- "./informix-init.sh:/docker-entrypoint-initdb.d/informix-init.sh"
#- "./informix-init.sql:/docker-entrypoint-initdb.d/informix-init.sql"
#entrypoint: /bin/bash /docker-entrypoint-initdb.d/informix-init.sh

# Titan (https://titan-data.io) is managing these images for our CI/CD process. If you want to run them locally you'll have to
# populate init script (hsqldb-init.sql) for this platform manually or install titan and pull image pre-populated with data

Expand Down
14 changes: 14 additions & 0 deletions src/test/resources/docker/informix-init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# Wait for Informix to be ready
echo "Waiting for Informix to be ready..."
while ! grep -q "listener thread is ready" /opt/ibm/informix/logs/online.log; do
sleep 5
done

# Execute the initialization SQL script
echo "Initializing Informix database..."
dbaccess - <<EOF
$(cat /docker-entrypoint-initdb.d/informix-init.sql)
EOF

echo "Database initialization completed."
1 change: 1 addition & 0 deletions src/test/resources/docker/informix-init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CREATE DATABASE testdb WITH LOG MODE ANSI;
8 changes: 8 additions & 0 deletions src/test/resources/harness-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,11 @@ databasesUnderTest:
url: jdbc:firebirdsql://localhost:3050/lbcat
username: lbuser
password: LiquibasePass1

- name: informix
prefix: docker
version: 14
url: jdbc:informix-sqli://localhost:9088/sysmaster:INFORMIXSERVER=informix;
rberezen marked this conversation as resolved.
Show resolved Hide resolved
username: informix
password: in4mix

Loading