aboutsummaryrefslogtreecommitdiff
path: root/src/test/resources
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-14 13:34:19 +0300
committerGravatar Vitaly Takmazov2022-12-14 16:18:06 +0300
commit560d89cb0285435f0e7c640b3fb67ab1197df808 (patch)
tree2e410bae3b5a4808c3efd16cf2a4875a68212c83 /src/test/resources
parent0c0ea8897e64461b1cfa9cd86a939b48f0bdd640 (diff)
CI: matrix tests on profile strategy
Diffstat (limited to 'src/test/resources')
-rw-r--r--src/test/resources/application-mysql.yml12
-rw-r--r--src/test/resources/application-postgres.yml12
-rw-r--r--src/test/resources/db/specific/mariadb/V1.00__schema.sql (renamed from src/test/resources/schema-mysql.sql)0
-rw-r--r--src/test/resources/db/specific/mariadb/V1.23__data.sql13
-rw-r--r--src/test/resources/db/specific/postgresql/V1.00__schema.sql (renamed from src/test/resources/schema-postgres.sql)9
-rw-r--r--src/test/resources/db/specific/postgresql/V1.23__data.sql13
6 files changed, 44 insertions, 15 deletions
diff --git a/src/test/resources/application-mysql.yml b/src/test/resources/application-mysql.yml
index 2203714f..e55a292f 100644
--- a/src/test/resources/application-mysql.yml
+++ b/src/test/resources/application-mysql.yml
@@ -1,13 +1,13 @@
spring:
datasource:
- platform: mysql
- initialization-mode: always
driver-class-name: org.mariadb.jdbc.Driver
- url: jdbc:mariadb://localhost:${mariaDB4j.port}/test?zeroDateTimeBehavior=convertToNull&useMysqlMetadata=true
+ url: jdbc:mariadb://localhost:3306/juick?zeroDateTimeBehavior=convertToNull
username: root
- password:
+ password: secret
flyway:
baseline-on-migrate: true
+ sql:
+ init:
+ platform: mysql
+ mode: always
-mariaDB4j:
- port: 3307 \ No newline at end of file
diff --git a/src/test/resources/application-postgres.yml b/src/test/resources/application-postgres.yml
new file mode 100644
index 00000000..b75b1e50
--- /dev/null
+++ b/src/test/resources/application-postgres.yml
@@ -0,0 +1,12 @@
+spring:
+ datasource:
+ url: jdbc:postgresql://localhost:5432/juick?stringtype=unspecified
+ username: juick
+ password: secret
+ flyway:
+ baseline-on-migrate: true
+ sql:
+ init:
+ platform: postgresql
+ mode: always
+
diff --git a/src/test/resources/schema-mysql.sql b/src/test/resources/db/specific/mariadb/V1.00__schema.sql
index d30cd9f7..d30cd9f7 100644
--- a/src/test/resources/schema-mysql.sql
+++ b/src/test/resources/db/specific/mariadb/V1.00__schema.sql
diff --git a/src/test/resources/db/specific/mariadb/V1.23__data.sql b/src/test/resources/db/specific/mariadb/V1.23__data.sql
new file mode 100644
index 00000000..a5db173a
--- /dev/null
+++ b/src/test/resources/db/specific/mariadb/V1.23__data.sql
@@ -0,0 +1,13 @@
+INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');
+INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');
+INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');
+INSERT INTO tags(tag_id, name) VALUES(2, 'juick');
+ALTER TABLE tags AUTO_INCREMENT = 10;
+ALTER TABLE users AUTO_INCREMENT = 10;
+INSERT INTO reactions (like_id, description) VALUES (1, 'like');
+INSERT INTO reactions (like_id, description) VALUES (2, 'love');
+INSERT INTO reactions (like_id, description) VALUES (3, 'lol');
+INSERT INTO reactions (like_id, description) VALUES (4, 'hmm');
+INSERT INTO reactions (like_id, description) VALUES (5, 'angry');
+INSERT INTO reactions (like_id, description) VALUES (6, 'uhblya');
+INSERT INTO reactions (like_id, description) VALUES (7, 'ugh');
diff --git a/src/test/resources/schema-postgres.sql b/src/test/resources/db/specific/postgresql/V1.00__schema.sql
index 7c4406f0..4909000a 100644
--- a/src/test/resources/schema-postgres.sql
+++ b/src/test/resources/db/specific/postgresql/V1.00__schema.sql
@@ -1500,15 +1500,6 @@ CREATE INDEX idx_29422_message_id ON favorites USING btree (message_id);
CREATE INDEX idx_29422_user_id ON favorites USING btree (user_id);
---
--- Name: public; Type: ACL; Schema: -; Owner: postgres
---
-
-REVOKE ALL ON SCHEMA public FROM PUBLIC;
-REVOKE ALL ON SCHEMA public FROM postgres;
-GRANT ALL ON SCHEMA public TO postgres;
-GRANT ALL ON SCHEMA public TO PUBLIC;
-
--
-- PostgreSQL database dump complete
diff --git a/src/test/resources/db/specific/postgresql/V1.23__data.sql b/src/test/resources/db/specific/postgresql/V1.23__data.sql
new file mode 100644
index 00000000..673b24d2
--- /dev/null
+++ b/src/test/resources/db/specific/postgresql/V1.23__data.sql
@@ -0,0 +1,13 @@
+INSERT INTO users(id, nick, passw) VALUES(0, 'Anonymous', 'password');
+INSERT INTO users(id, nick, passw) VALUES(2, 'juick', 'password');
+INSERT INTO users(id, nick, passw) VALUES(5, 'archive', 'password');
+INSERT INTO tags(tag_id, name) VALUES(2, 'juick');
+alter sequence tags_tag_id_seq restart with 10;
+alter sequence users_id_seq restart with 10;
+INSERT INTO reactions (like_id, description) VALUES (1, 'like');
+INSERT INTO reactions (like_id, description) VALUES (2, 'love');
+INSERT INTO reactions (like_id, description) VALUES (3, 'lol');
+INSERT INTO reactions (like_id, description) VALUES (4, 'hmm');
+INSERT INTO reactions (like_id, description) VALUES (5, 'angry');
+INSERT INTO reactions (like_id, description) VALUES (6, 'uhblya');
+INSERT INTO reactions (like_id, description) VALUES (7, 'ugh');