5
5
from dotenv import load_dotenv
6
6
from typing import Any
7
7
from dataclasses import dataclass
8
+ import sys
8
9
from testcontainers .postgres import PostgresContainer
9
10
from testcontainers .core .container import DockerContainer
10
11
from testcontainers .core .waiting_utils import wait_for_logs
@@ -21,7 +22,7 @@ class SeamBackend:
21
22
sandbox_api_key : str
22
23
23
24
24
- @pytest .fixture
25
+ @pytest .fixture ( scope = "session" )
25
26
def seam_backend ():
26
27
with PostgresContainer ("postgres:13" , dbname = "postgres" ) as pg :
27
28
db_host = "host.docker.internal" if sys .platform == "darwin" else "172.17.0.1"
@@ -34,18 +35,18 @@ def seam_backend():
34
35
).with_env ("DATABASE_NAME" , "seam_api" ).with_env ("NODE_ENV" , "test" ).with_env (
35
36
"POSTGRES_HOST" , db_host
36
37
).with_env (
37
- "SERVER_BASE_URL" , "http://localhost:3021 "
38
+ "SERVER_BASE_URL" , "http://localhost:3000 "
38
39
).with_env (
39
40
"SEAMTEAM_ADMIN_PASSWORD" , "1234"
40
41
).with_bind_ports (
41
- 3000 , 4020
42
+ 3000 , 3000
42
43
).with_command (
43
44
"start:for-integration-testing"
44
45
) as sc_container :
45
46
wait_for_logs (sc_container , r"started server" , timeout = 20 )
46
- requests .get ("http://localhost:4020 /health" )
47
+ requests .get ("http://localhost:3000 /health" )
47
48
yield SeamBackend (
48
- url = "http://localhost:4020 " ,
49
+ url = "http://localhost:3000 " ,
49
50
sandbox_api_key = "seam_sandykey_0000000000000000000sand" ,
50
51
)
51
52
0 commit comments