mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
automated testing updates
This commit is contained in:
parent
17ec6d7ae4
commit
1ec0f80651
3 changed files with 36 additions and 1 deletions
17
.github/README.md
vendored
17
.github/README.md
vendored
|
|
@ -37,17 +37,32 @@ We have containerized FilterLists to make it as easy as possible for contributer
|
|||
2. Clone the FilterLists git repository to your computer. [Docs](https://help.github.com/en/articles/cloning-a-repository)
|
||||
3. Navigate to the root directory of your locally cloned FilterLists git repository in a command-line interface (bash, cmd, etc.).
|
||||
4. Execute `docker-compose up -d`.
|
||||
5. Visit the locally running version of FilterLists in a web browser at `http://localhost/` (web) and `http://localhost/api/v1/lists` (API).
|
||||
5. Visit the locally running version of FilterLists in a web browser at `http://localhost/`.
|
||||
|
||||
### Testing changes to the data (.json files)
|
||||
|
||||
#### Automated
|
||||
|
||||
Execute `docker-compose -f docker-compose.data.tests.yml down -v && docker-compose -f docker-compose.data.tests.yml build api && docker-compose -f docker-compose.data.tests.yml run api`
|
||||
|
||||
#### Manual
|
||||
|
||||
1. Execute `docker container ls` to find the `CONTAINER ID` of the `filterlists.api` container.
|
||||
2. Execute `docker-compose up -d --build [CONTAINER ID]` replacing `[CONTAINER ID]` with the hash from step 1.
|
||||
3. Verify your changes are properly reflected at `http://localhost/`.
|
||||
|
||||
### Testing changes to the `Api`, `Services`, or `Data` projects
|
||||
|
||||
#### Automated
|
||||
|
||||
- `Services`: Execute `docker-compose -f docker-compose.services.tests.yml down -v && docker-compose -f docker-compose.services.tests.yml build api && docker-compose -f docker-compose.services.tests.yml run api`
|
||||
- `Data`: Execute `docker-compose -f docker-compose.data.tests.yml down -v && docker-compose -f docker-compose.data.tests.yml build api && docker-compose -f docker-compose.data.tests.yml run api`
|
||||
|
||||
#### Manual
|
||||
|
||||
1. Execute `docker container ls` to find the `CONTAINER ID` of the `filterlists.api` container.
|
||||
2. Execute `docker-compose up -d --build [CONTAINER ID]` replacing `[CONTAINER ID]` with the hash from step 1.
|
||||
3. Verify your changes are properly reflected at `http://localhost/api`.
|
||||
|
||||
### Testing changes to the `Web` project
|
||||
|
||||
|
|
|
|||
13
docker-compose.data.services.yml
Normal file
13
docker-compose.data.services.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/FilterLists.Api/Dockerfile
|
||||
target: test-services
|
||||
networks:
|
||||
- test-services
|
||||
|
||||
networks:
|
||||
test-services:
|
||||
|
|
@ -6,11 +6,15 @@ services:
|
|||
context: .
|
||||
dockerfile: src/FilterLists.Api/Dockerfile
|
||||
target: test-data
|
||||
networks:
|
||||
- test-data
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10
|
||||
networks:
|
||||
- test-data
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=filterlists
|
||||
- MYSQL_DATABASE=filterlists
|
||||
|
|
@ -22,3 +26,6 @@ services:
|
|||
"--character-set-server=utf8mb4",
|
||||
"--collation-server=utf8mb4_unicode_520_ci"
|
||||
]
|
||||
|
||||
networks:
|
||||
test-data:
|
||||
|
|
|
|||
Loading…
Reference in a new issue