Skip to content

Commit f8a48a8

Browse files
committed
feat: add temporary filesystem mounts for various services in docker-compose files
1 parent 41f7839 commit f8a48a8

5 files changed

Lines changed: 43 additions & 0 deletions

File tree

backend/test/ava-tests/saas-tests/table-cassandra-agent.e2e.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ test.before(async () => {
7878
.set('Accept', 'application/json');
7979
const createConnectionRO = JSON.parse(createConnectionResponse.text);
8080
createdConnectionId = createConnectionRO.id;
81+
await _testUtils.sleep(2000);
8182
});
8283

8384
test.beforeEach(async () => {

backend/test/ava-tests/saas-tests/table-clickhouse-agent-e2e.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ test.before(async () => {
7777
.set('Accept', 'application/json');
7878
const createConnectionRO = JSON.parse(createConnectionResponse.text);
7979
createdConnectionId = createConnectionRO.id;
80+
await _testUtils.sleep(2000);
8081
});
8182

8283
test.after(async () => {

backend/test/ava-tests/saas-tests/table-redis-agent-e2e.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ test.before(async () => {
7171
.set('Accept', 'application/json');
7272
const createConnectionRO = JSON.parse(createConnectionResponse.text);
7373
createdConnectionId = createConnectionRO.id;
74+
await _testUtils.sleep(2000);
7475
});
7576

7677
test.after(async () => {

docker-compose.tst.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ services:
6464
environment:
6565
POSTGRES_PASSWORD: 123
6666
command: postgres -c 'max_connections=300'
67+
tmpfs:
68+
- /var/lib/postgresql
6769
healthcheck:
6870
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
6971
interval: 10s
@@ -79,6 +81,8 @@ services:
7981
MONGO_INITDB_ROOT_PASSWORD: example
8082
ports:
8183
- 27017:27017
84+
tmpfs:
85+
- /data/db
8286
healthcheck:
8387
test: [ "CMD", "mongosh", "--eval", "db.adminCommand('ping')" ]
8488
interval: 10s
@@ -109,6 +113,8 @@ services:
109113
- ACCEPT_EULA=Y
110114
ports:
111115
- "5434:1433"
116+
tmpfs:
117+
- /var/opt/mssql
112118
healthcheck:
113119
test:
114120
[
@@ -129,6 +135,8 @@ services:
129135
- 1521:1521
130136
environment:
131137
ORACLE_PASSWORD: 12345
138+
tmpfs:
139+
- /opt/oracle/oradata
132140
healthcheck:
133141
test: [ "CMD-SHELL", "healthcheck.sh" ]
134142
interval: 10s
@@ -156,6 +164,8 @@ services:
156164
- CASSANDRA_DC=TestDC
157165
- CASSANDRA_RACK=TestRack
158166
restart: always
167+
tmpfs:
168+
- /var/lib/cassandra
159169
healthcheck:
160170
test:
161171
[
@@ -176,6 +186,8 @@ services:
176186
test-redis-e2e-testing:
177187
image: redis:7.0.11
178188
command: [ "redis-server", "--requirepass", "SuperSecretRedisPassword" ]
189+
tmpfs:
190+
- /data
179191
healthcheck:
180192
test: [ "CMD", "redis-cli", "ping" ]
181193
interval: 30s
@@ -234,6 +246,8 @@ services:
234246
- CLICKHOUSE_USER=default
235247
- CLICKHOUSE_PASSWORD=clickhouse_password
236248
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
249+
tmpfs:
250+
- /var/lib/clickhouse
237251
ulimits:
238252
nofile:
239253
soft: 262144
@@ -261,6 +275,8 @@ services:
261275
- ES_JAVA_OPTS=-Xms512m -Xmx512m
262276
ports:
263277
- 9200:9200
278+
tmpfs:
279+
- /usr/share/elasticsearch/data
264280
ulimits:
265281
memlock:
266282
soft: -1

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ services:
4646
environment:
4747
MYSQL_ROOT_PASSWORD: 123
4848
MYSQL_DATABASE: testDB
49+
tmpfs:
50+
- /var/lib/mysql
4951

5052
testPg-e2e-testing:
5153
image: postgres
@@ -54,6 +56,8 @@ services:
5456
environment:
5557
POSTGRES_PASSWORD: 123
5658
command: postgres -c 'max_connections=300'
59+
tmpfs:
60+
- /var/lib/postgresql
5761

5862
postgres:
5963
image: postgres
@@ -62,6 +66,8 @@ services:
6266
environment:
6367
POSTGRES_PASSWORD: abc123
6468
command: postgres -c 'max_connections=300'
69+
tmpfs:
70+
- /var/lib/postgresql
6571

6672
mssql-e2e-testing:
6773
image: mcr.microsoft.com/mssql/server:2019-latest
@@ -70,13 +76,17 @@ services:
7076
- ACCEPT_EULA=Y
7177
ports:
7278
- "5434:1433"
79+
tmpfs:
80+
- /var/opt/mssql
7381

7482
test-oracle-e2e-testing:
7583
image: gvenzl/oracle-xe
7684
ports:
7785
- 1521:1521
7886
environment:
7987
ORACLE_PASSWORD: 12345
88+
tmpfs:
89+
- /opt/oracle/oradata
8090

8191
autoadmin-ws-server:
8292
build:
@@ -120,6 +130,8 @@ services:
120130
environment:
121131
POSTGRES_PASSWORD: abc987
122132
command: postgres -c 'max_connections=300'
133+
tmpfs:
134+
- /var/lib/postgresql
123135

124136
test-ibm-db2-e2e-testing:
125137
image: icr.io/db2_community/db2
@@ -152,6 +164,8 @@ services:
152164
MONGO_INITDB_ROOT_PASSWORD: example
153165
ports:
154166
- 27017:27017
167+
tmpfs:
168+
- /data/db
155169

156170
test-dynamodb-e2e-testing:
157171
image: amazon/dynamodb-local
@@ -171,6 +185,8 @@ services:
171185
- ELASTIC_PASSWORD=SuperSecretElasticPassword
172186
- xpack.security.enabled=true
173187
- ES_JAVA_OPTS=-Xms512m -Xmx512m
188+
tmpfs:
189+
- /usr/share/elasticsearch/data
174190
ulimits:
175191
memlock:
176192
soft: -1
@@ -195,6 +211,8 @@ services:
195211
- CASSANDRA_DC=TestDC
196212
- CASSANDRA_RACK=TestRack
197213
restart: always
214+
tmpfs:
215+
- /var/lib/cassandra
198216
healthcheck:
199217
test:
200218
[
@@ -227,6 +245,8 @@ services:
227245
ports:
228246
- 6379:6379
229247
command: ["redis-server", "--requirepass", "SuperSecretRedisPassword"]
248+
tmpfs:
249+
- /data
230250
healthcheck:
231251
test: ["CMD", "redis-cli", "ping"]
232252
interval: 30s
@@ -244,6 +264,8 @@ services:
244264
- CLICKHOUSE_USER=default
245265
- CLICKHOUSE_PASSWORD=clickhouse_password
246266
- CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1
267+
tmpfs:
268+
- /var/lib/clickhouse
247269
ulimits:
248270
nofile:
249271
soft: 262144
@@ -273,6 +295,8 @@ services:
273295
POSTGRES_HOST_AUTH_METHOD: md5
274296
POSTGRES_INITDB_ARGS: "--auth-host=md5"
275297
command: postgres -c 'max_connections=300' -c 'password_encryption=md5'
298+
tmpfs:
299+
- /var/lib/postgresql
276300

277301
proxy-mock-api:
278302
build:

0 commit comments

Comments
 (0)