diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 31d48a2..3c008ed 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,7 +14,14 @@ jobs:
ci:
uses: killbill/gh-actions-shared/.github/workflows/ci.yml@main
with:
- test-profile-matrix: '[ "travis"]'
+ test-profile-matrix: '[ "travis", "integration-mysql", "integration-postgresql" ]'
failure-upload-path: 'target/*'
- jdk-matrix: '[ "11"]'
-
\ No newline at end of file
+ jdk-matrix: '[ "11"]'
+
+ integration_test:
+ uses: killbill/gh-actions-shared/.github/workflows/integration_test.yml@main
+ with:
+ plugin_name: 'payment-test'
+ integration_tests_goal: 'test:plugins:payment-test'
+ ddl_file: 'src/main/resources/ddl.sql'
+ integration_tests_ref: 'refs/heads/work-for-release-0.23.x'
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..c150684
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,10 @@
+name: CodeQL
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+
+jobs:
+ analyze:
+ uses: killbill/gh-actions-shared/.github/workflows/codeql-analysis.yml@main
diff --git a/.gitignore b/.gitignore
index 2db40b1..1e9a26f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,3 +39,4 @@ dependency-reduced-pom.xml
pom.xml.releaseBackup
release.properties
+/.project
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 8d4cbab..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-############################################################################################
-# #
-# Copyright 2010-2011 Ning, Inc. #
-# Copyright 2015 Groupon, Inc #
-# Copyright 2022 The Billing Project, LLC #
-# #
-# The Billing Project licenses this file to you under the Apache License, version 2.0 #
-# (the "License"); you may not use this file except in compliance with the #
-# License. You may obtain a copy of the License at: #
-# #
-# http://www.apache.org/licenses/LICENSE-2.0 #
-# #
-# Unless required by applicable law or agreed to in writing, software #
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
-# License for the specific language governing permissions and limitations #
-# under the License. #
-# #
-############################################################################################
-
-language: ruby
-
-sudo: false
-cache: bundler
-
-before_script:
- - bundle exec jbundle install
-
-script: 'bundle exec rake spec'
-
-notifications:
- email:
- - kill-bill-commits@googlegroups.com
-
-env:
- global:
- - JRUBY_OPTS='-J-Xmx1024M'
-
-rvm:
- - jruby-1.7.20
- - jruby-20mode # latest 1.7.x
- - jruby-head
-
-gemfile:
- - Gemfile
- - Gemfile.head
-
-jdk:
- - openjdk7
- - oraclejdk7
- - oraclejdk8
-
-matrix:
- allow_failures:
- - rvm: jruby-head
- - jdk: oraclejdk8
- - gemfile: Gemfile.head
- fast_finish: true
-
-after_success:
- - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && echo "sonatype-nexus-snapshots\${env.OSSRH_USER}\${env.OSSRH_PASS}" > ~/settings.xml && MVN="mvn --settings $HOME/settings.xml" NO_RELEASE=1 travis_retry travis_wait bash release.sh | egrep -v "Download|Install|Upload" ; rm -f ~/settings.xml'
diff --git a/README.md b/README.md
index 67e6079..fae8d65 100644
--- a/README.md
+++ b/README.md
@@ -8,11 +8,12 @@ Kill Bill compatibility
-----------------------
| Plugin version | Kill Bill version |
-| -------------: | ----------------: |
-| 4.x.y | 0.18.z |
-| 5.x.y | 0.19.z |
-| 6.x.y | 0.20.z |
-| 7.x.y | 0.22.z |
+|---------------:|------------------:|
+| 4.x.y | 0.18.z |
+| 5.x.y | 0.19.z |
+| 6.x.y | 0.20.z |
+| 7.x.y | 0.22.z |
+| 8.x.y | 0.23.z |
Requirements
diff --git a/docker/docker-compose.ci.mysql.yml b/docker/docker-compose.ci.mysql.yml
new file mode 100644
index 0000000..91a6cd6
--- /dev/null
+++ b/docker/docker-compose.ci.mysql.yml
@@ -0,0 +1,41 @@
+#
+# Copyright 2020-2022 Equinix, Inc
+# Copyright 2014-2022 The Billing Project, LLC
+#
+# The Billing Project licenses this file to you under the Apache License, version 2.0
+# (the "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+version: '3.8'
+
+services:
+ killbill:
+ network_mode: host
+ image: killbill/killbill:0.23.0-9116fa4-SNAPSHOT
+ environment:
+ - KILLBILL_CATALOG_URI=SpyCarAdvanced.xml
+ - KILLBILL_DAO_URL=jdbc:mysql://127.0.0.1:3306/killbill
+ - KILLBILL_DAO_USER=root
+ - KILLBILL_DAO_PASSWORD=root
+ - KILLBILL_SERVER_TEST_MODE=true
+ - KILLBILL_INVOICE_SANITY_SAFETY_BOUND_ENABLED=false
+ - KILLBILL_INVOICE_MAX_DAILY_NUMBER_OF_ITEMS_SAFETY_BOUND=-1
+ depends_on:
+ - db
+ volumes:
+ - /var/tmp/bundles/plugins/java/payment-test-plugin:/var/lib/killbill/bundles/plugins/java/payment-test-plugin
+ - /var/tmp/tomcat_logs:/var/lib/tomcat/logs
+ db:
+ network_mode: host
+ image: killbill/mariadb:0.23
+ environment:
+ - MYSQL_ROOT_PASSWORD=root
diff --git a/docker/docker-compose.ci.postgresql.yml b/docker/docker-compose.ci.postgresql.yml
new file mode 100644
index 0000000..658fdbc
--- /dev/null
+++ b/docker/docker-compose.ci.postgresql.yml
@@ -0,0 +1,41 @@
+#
+# Copyright 2020-2022 Equinix, Inc
+# Copyright 2014-2022 The Billing Project, LLC
+#
+# The Billing Project licenses this file to you under the Apache License, version 2.0
+# (the "License"); you may not use this file except in compliance with the
+# License. You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+
+version: '3.8'
+
+services:
+ killbill:
+ network_mode: host
+ image: killbill/killbill:0.23.0-9116fa4-SNAPSHOT
+ environment:
+ - KILLBILL_CATALOG_URI=SpyCarAdvanced.xml
+ - KILLBILL_DAO_URL=jdbc:postgresql://127.0.0.1:5432/killbill
+ - KILLBILL_DAO_USER=postgres
+ - KILLBILL_DAO_PASSWORD=postgres
+ - KILLBILL_SERVER_TEST_MODE=true
+ - KILLBILL_INVOICE_SANITY_SAFETY_BOUND_ENABLED=false
+ - KILLBILL_INVOICE_MAX_DAILY_NUMBER_OF_ITEMS_SAFETY_BOUND=-1
+ depends_on:
+ - db
+ volumes:
+ - /var/tmp/bundles/plugins/java/payment-test-plugin:/var/lib/killbill/bundles/plugins/java/payment-test-plugin
+ - /var/tmp/tomcat_logs:/var/lib/tomcat/logs
+ db:
+ network_mode: host
+ image: killbill/postgresql:0.23
+ environment:
+ - POSTGRES_PASSWORD=postgres
diff --git a/pom.xml b/pom.xml
index 7c199f5..808c067 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,11 +19,11 @@
org.kill-bill.billing
killbill-oss-parent
- 0.144.84
+ 0.145.3-6e4b9ef-SNAPSHOT
org.kill-bill.billing.plugin.java
payment-test-plugin
- 7.0.5-SNAPSHOT
+ 8.0.0-SNAPSHOT
bundle
Kill Bill Payment Test plugin
Kill Bill Payment Test plugin
@@ -40,6 +40,7 @@
true
spotbugs-exclude.xml
+ 5.0.0-14752c2-SNAPSHOT
org.killbill.billing.plugin.payment.*
@@ -60,14 +61,24 @@
guava
- javax.inject
- javax.inject
+ io.airlift
+ testing-mysql-server
+ test
- javax.servlet
- javax.servlet-api
+ io.airlift
+ testing-postgresql-server
+ test
+
+
+ jakarta.servlet
+ jakarta.servlet-api
provided
+
+ javax.inject
+ javax.inject
+
joda-time
joda-time
@@ -76,6 +87,7 @@
org.apache.felix
org.apache.felix.framework
+ provided
org.jooby
@@ -104,35 +116,31 @@
org.kill-bill.billing
killbill-platform-osgi-bundles-lib-killbill
+ provided
org.kill-bill.billing
killbill-platform-test
test
-
-
- org.osgi
- org.osgi.core
-
-
+
+
+ org.kill-bill.billing.plugin
+ killbill-plugin-api-control
+ provided
+
+
+ org.kill-bill.billing.plugin
+ killbill-plugin-api-notification
+ provided
org.kill-bill.billing.plugin
killbill-plugin-api-payment
+ provided
org.kill-bill.billing.plugin.java
killbill-base-plugin
-
-
- org.osgi
- org.osgi.core
-
-
- org.reactivestreams
- reactive-streams
-
-
org.kill-bill.billing.plugin.java
@@ -144,11 +152,22 @@
org.kill-bill.commons
killbill-clock
+
+ org.kill-bill.commons
+ killbill-clock
+ test-jar
+ test
+
org.kill-bill.commons
killbill-embeddeddb-common
test
+
+ org.kill-bill.commons
+ killbill-metrics-api
+ provided
+
org.mockito
mockito-core
@@ -159,6 +178,11 @@
slf4j-api
provided
+
+ org.slf4j
+ slf4j-simple
+ test
+
org.testng
testng
@@ -167,43 +191,10 @@
-
- com.ning.maven.plugins
- maven-dependency-versions-check-plugin
-
-
-
- org.jooq
- jooq
- 3.14.13
- 3.13.5
-
-
- org.reactivestreams
- reactive-streams
- 1.0.3
- 1.0.2
-
-
-
-
org.apache.felix
maven-bundle-plugin
-
- org.apache.maven.plugins
- maven-enforcer-plugin
-
-
-
-
- org.jooq:jooq
-
-
-
-
-
diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml
index b90ac19..94b4813 100644
--- a/spotbugs-exclude.xml
+++ b/spotbugs-exclude.xml
@@ -20,28 +20,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
diff --git a/src/main/resources/ddl-postgresql.sql b/src/main/resources/ddl-postgresql.sql
new file mode 100644
index 0000000..62690a0
--- /dev/null
+++ b/src/main/resources/ddl-postgresql.sql
@@ -0,0 +1,21 @@
+/*
+ * Copyright 2020-2021 Equinix, Inc
+ * Copyright 2014-2021 The Billing Project, LLC
+ *
+ * The Billing Project licenses this file to you under the Apache License, version 2.0
+ * (the "License"); you may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* We cannot use timestamp in MySQL because of the implicit TimeZone conversions it does behind the scenes */
+CREATE DOMAIN datetime AS timestamp without time zone;
+
+CREATE DOMAIN longtext AS text;
diff --git a/src/test/java/org/killbill/billing/plugin/payment/EmbeddedDbHelper.java b/src/test/java/org/killbill/billing/plugin/payment/EmbeddedDbHelper.java
index 0b21f5d..37cef68 100644
--- a/src/test/java/org/killbill/billing/plugin/payment/EmbeddedDbHelper.java
+++ b/src/test/java/org/killbill/billing/plugin/payment/EmbeddedDbHelper.java
@@ -36,6 +36,9 @@ public static EmbeddedDbHelper instance() {
}
public void startDb() throws Exception {
+ System.setProperty("org.jooq.no-logo", "true");
+ System.setProperty("org.jooq.no-tips", "true");
+
this.embeddedDB = PlatformDBTestingHelper.get().getInstance();
this.embeddedDB.initialize();
this.embeddedDB.start();