Skip to content

Commit d0c19c5

Browse files
committed
Add mysql to MESSAGE_QUEUE, KV_STORE, and DB_TO_CHECK in @fedify/init
Without this, the mysql entries in mq.json and kv.json were silently ignored because the MessageQueue and KvStore types are derived from the MESSAGE_QUEUE and KV_STORE constant arrays respectively, and mysql was not listed in either. As a result, fedify init never offered MySQL/MariaDB as a selectable backend option despite the JSON entries being present. Also added mysql to DB_TO_CHECK and the corresponding db-to-check.json so that the test suite can check whether a MySQL instance is running before running integration tests. #600 (comment)
1 parent 6b8da9c commit d0c19c5

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

packages/init/src/const.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ export const WEB_FRAMEWORK = [
1212
] as const;
1313

1414
/** All supported message queue backend identifiers. */
15-
export const MESSAGE_QUEUE = ["denokv", "redis", "postgres", "amqp"] as const;
15+
export const MESSAGE_QUEUE = [
16+
"denokv",
17+
"redis",
18+
"postgres",
19+
"mysql",
20+
"amqp",
21+
] as const;
1622

1723
/** All supported key-value store backend identifiers. */
18-
export const KV_STORE = ["denokv", "redis", "postgres"] as const;
24+
export const KV_STORE = ["denokv", "redis", "postgres", "mysql"] as const;
1925

2026
/**
2127
* External database services that need to be running for integration tests.
2228
* Used by the test suite to check service availability before running tests.
2329
*/
24-
export const DB_TO_CHECK = ["redis", "postgres", "amqp"] as const;
30+
export const DB_TO_CHECK = ["redis", "postgres", "mysql", "amqp"] as const;

packages/init/src/json/db-to-check.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
"defaultPort": 5432,
1010
"documentation": "https://www.postgresql.org/download/"
1111
},
12+
"mysql": {
13+
"name": "MySQL/MariaDB",
14+
"defaultPort": 3306,
15+
"documentation": "https://dev.mysql.com/doc/mysql-installation-excerpt/en/"
16+
},
1217
"amqp": {
1318
"name": "RabbitMQ",
1419
"defaultPort": 5672,

0 commit comments

Comments
 (0)