Skip to content

Commit 62c536a

Browse files
committed
テスト周りのリファクタ
1 parent c6f241f commit 62c536a

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ management tool for equipment and book rental
99

1010
## Development environment
1111

12-
### Setup with docker and docker-compose
12+
### Setup with docker (compose)
1313

1414
#### First Up (or entirely rebuild)
1515

@@ -38,3 +38,14 @@ $ docker compose -f docker/test/docker-compose.yml up --abort-on-container-exit
3838

3939
`docker compose down -v`
4040

41+
### Setup VSCode
42+
43+
write it down in your `.vscode/settings.json`
44+
45+
```json
46+
{
47+
"go.testEnvVars": {
48+
"MYSQL_DATABASE": "test"
49+
}
50+
}
51+
```

docker-compose.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ services:
88
MYSQL_USERNAME: root
99
MYSQL_PASSWORD: password
1010
volumes:
11-
- booq-db:/var/lib/mysql
1211
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
1312
expose:
1413
- '3306'
@@ -31,8 +30,6 @@ services:
3130
MINIO_ROOT_PASSWORD: password
3231
MINIO_ACCESS_KEY: minio_access_key
3332
MINIO_SECRET_KEY: minio_secret_key
34-
volumes:
35-
- booq-s3:/data
3633
s3-init:
3734
image: minio/mc
3835
depends_on:
@@ -81,7 +78,3 @@ services:
8178
restart: always
8279
ports:
8380
- 8000:8080
84-
85-
volumes:
86-
booq-db:
87-
booq-s3:

docker/init.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ SET
33

44
SET
55
collation_server = 'utf8mb4_general_ci';
6+
7+
CREATE DATABASE IF NOT EXISTS `test`;
File renamed without changes.

0 commit comments

Comments
 (0)