Compare commits

...

3 Commits

Author SHA1 Message Date
Iain Sproat 9a2651bec1 Specklepy relies on the frontend being available 2024-07-18 08:39:19 +01:00
Iain Sproat a85e3baaec Include toxiproxy.json file 2024-07-17 14:09:07 +01:00
Iain Sproat 9dd801a20b chore(tests): add toxiproxy for integration testing network issues 2024-07-17 13:52:11 +01:00
3 changed files with 29 additions and 40 deletions
+20 -39
View File
@@ -111,46 +111,27 @@ services:
POSTGRES_DB: "speckle"
ENABLE_MP: "false"
preview-service:
image: speckle/speckle-preview-service:latest
restart: always
depends_on:
speckle-server:
condition: service_healthy
mem_limit: "1000m"
memswap_limit: "1000m"
environment:
DEBUG: "preview-service:*"
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
####
# Testing and development tools
#######
webhook-service:
image: speckle/speckle-webhook-service:latest
restart: always
depends_on:
speckle-server:
condition: service_healthy
environment:
DEBUG: "webhook-service:*"
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
WAIT_HOSTS: postgres:5432
fileimport-service:
image: speckle/speckle-fileimport-service:latest
restart: always
depends_on:
speckle-server:
condition: service_healthy
environment:
DEBUG: "fileimport-service:*"
PG_CONNECTION_STRING: "postgres://speckle:speckle@postgres/speckle"
WAIT_HOSTS: postgres:5432
S3_ENDPOINT: "http://minio:9000"
S3_ACCESS_KEY: "minioadmin"
S3_SECRET_KEY: "minioadmin"
S3_BUCKET: "speckle-server"
SPECKLE_SERVER_URL: "http://speckle-server:3000"
toxiproxy:
###
# Toxiproxy is a tool to simulate network conditions https://github.com/Shopify/toxiproxy
# Instead of connecting to speckle-server on port 3000, connect to ToxiProxy on port 3001
# Toxiproxy will forward the connection to speckle-server
# Use the ToxiProxy API to simulate network conditions as necessary
###
image: ghcr.io/shopify/toxiproxy:2.9.0
volumes:
# This mounts the toxiproxy.json file into the container at /config/toxiproxy.json
- ./toxiproxy.json:/config/toxiproxy.json
# This command starts toxiproxy with the configuration file
entrypoint: /toxiproxy -config /config/toxiproxy.json
ports:
# open ports to match the 'listen' ports in the toxiproxy.json file
- 8474:8474 # Toxiproxy API
- 3001:3001 # Speckle server
networks:
default:
+1 -1
View File
@@ -17,7 +17,7 @@ metrics.disable()
@pytest.fixture(scope="session")
def host():
return "localhost:3000"
return "localhost:3001"
def seed_user(host):
+8
View File
@@ -0,0 +1,8 @@
[
{
"name": "speckle_test_speckle-server",
"listen": "0.0.0.0:3001",
"upstream": "speckle-server:3000",
"enabled": true
}
]