You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docker/dts/README.md
+41-15Lines changed: 41 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,26 @@
1
-
The `docker-compose.yaml` file in this directory is primarily intended for testing the DTS services of the TESP API.
1
+
The `docker-compose.yaml` file in this directory is primarily intended for testing the DTS services of the TESP API. Smoke tests exercise **only the HTTP service**.
2
2
To ensure proper execution of the tests, run `docker-compose.yaml` both in this directory and in the `/tesp-api` directory with:
3
3
```
4
4
docker compose up -d --build
5
5
```
6
-
7
6
# DTS
8
7
9
8
Example of data transfer server using HTTP, S3 and FTP.
10
9
11
-
Project uses Docker and deploy 4 containers:
10
+
### Current status
11
+
12
+
- HTTP is the only DTS service implemented in this repository and used by smoke tests.
13
+
- S3 runs MinIO as an external service for manual testing.
14
+
- FTP runs the upstream `ftpserver` container and uses S3 (MinIO) as its storage backend.
15
+
16
+
`docker-compose.yaml` deploys 4 containers:
12
17
- s3
13
18
- ftp
14
19
- http
15
20
- clients
16
21
17
-
The `clients` container contains clients for the used protocols. So you doesn't need to install the clients on you local computer to test it.
22
+
The `clients` container contains clients for the used protocols, so you do not need to install the clients on your local computer to test it.
23
+
18
24
19
25
## Deploy
20
26
@@ -24,11 +30,20 @@ The `clients` container contains clients for the used protocols. So you doesn't
24
30
25
31
### HTTP
26
32
27
-
Upload
28
-
`curl -i -X POST -F "file=@up-file.txt;filename=file.txt" service-http:5000/upload`
33
+
The HTTP service provides multiple routes:
29
34
30
-
Download
31
-
`curl -X GET -o down-file.txt service-http:5000/download/file.txt`
35
+
**Upload** (saves to `/data/uploaded_data/`)
36
+
`curl -i -X POST -F "file=@up-file.txt" localhost:5000/upload`
37
+
38
+
**Download (legacy route)**
39
+
`curl -X GET -o down-file.txt localhost:5000/download/file.txt`
To test functionality of TESP API, running `docker-compose.yaml` with:
2
+
3
+
Integration tests for TESP-API. All tests run against a live TESP-API instance at `http://localhost:8080`.
4
+
5
+
## Prerequisites
6
+
7
+
Start TESP-API + MongoDB + Pulsar from the project root:
8
+
9
+
```bash
10
+
docker compose --profile pulsar up -d --build
3
11
```
4
-
docker compose up -d --build
12
+
13
+
## Running Tests
14
+
15
+
### 1. Start the upload server
16
+
17
+
For I/O tests (`test_inputs`, `test_dir_input`, `test_volumes`, `test_envs`), the test fixtures download/upload files via HTTP. Start the local file server:
18
+
19
+
```bash
20
+
python3 tests/upload_server.py
5
21
```
6
-
is necessary both in `/tesp-api` and `/tesp-api/docker/dts`
7
-
Tests themselves can be run with:
22
+
23
+
This serves `tests/test_data/` on port 5000 and accepts uploads to `tests/uploaded_data/`.
24
+
25
+
### 2. Run smoke tests
26
+
27
+
```bash
28
+
python3 -m pytest tests/smoke_tests.py -v
8
29
```
9
-
python3 -m pytest smoke_tests.py
30
+
31
+
### Load/stress test (100 concurrent tasks)
32
+
33
+
```bash
34
+
python3 -m pytest tests/load_stress_test.py -v
10
35
```
36
+
37
+
## Platform Notes
38
+
39
+
The test fixtures use `http://172.17.0.1:5000` to reach the host from inside containers. This works on **Linux** (Docker bridge gateway IP).
40
+
41
+
42
+
## Test Fixtures
43
+
44
+
All task JSON fixtures are in `test_jsons/`. Key files:
|`dir-io.json`| Directory input/output via HTTP |**Yes**|
54
+
|`volumes.json`| Shared volume between executors |**Yes**|
55
+
|`envs.json`| Environment variables with output upload |**Yes**|
56
+
|`workdir.json`| Working directory test | No |
57
+
58
+
## DTS (Data Transfer Services)
59
+
60
+
The `docker/dts/` directory contains an **alternative** test infrastructure with MinIO (S3), FTP, and HTTP services running in containers. At the moment, only HTTP service is compatible with the smoke tests.
61
+
62
+
### Using DTS instead of upload_server.py
63
+
64
+
```bash
65
+
# Start DTS (from project root)
66
+
cd docker/dts && docker compose up -d --build &&cd ../..
67
+
68
+
# Run tests (DTS serves on the same port 5000)
69
+
python3 -m pytest tests/smoke_tests.py -v
70
+
```
71
+
72
+
DTS mounts `tests/test_data/` and `tests/uploaded_data/` so the same fixture URLs work.
73
+
74
+
## Cleanup
75
+
76
+
The test suite automatically cleans up:
77
+
-`uploaded_data/` directory created by upload tests
0 commit comments