File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
13import pytest
24from pytest_cases import fixture
35
1315@fixture (scope = "session" )
1416def api_client (pytestconfig ):
1517 if pytestconfig .getoption ("--drone" ):
16- return OpenCTIApiClient (
17- "http://opencti:4000" ,
18- "bfa014e0-e02e-4aa6-a42b-603b19dcf159" ,
19- ssl_verify = False ,
18+ api_url = os .getenv ("OPENCTI_API_URL" , "http://opencti:4000" )
19+ api_token = os .getenv (
20+ "OPENCTI_API_TOKEN" , "bfa014e0-e02e-4aa6-a42b-603b19dcf159"
2021 )
2122 else :
22- return OpenCTIApiClient (
23- "http://localhost:4000" ,
24- "d434ce02-e58e-4cac-8b4c-42bf16748e84" ,
25- ssl_verify = False ,
23+ api_url = os .getenv ("OPENCTI_API_URL" , "http://localhost:4000" )
24+ api_token = os .getenv (
25+ "OPENCTI_API_TOKEN" , "d434ce02-e58e-4cac-8b4c-42bf16748e84"
2626 )
2727
28+ return OpenCTIApiClient (
29+ api_url ,
30+ api_token ,
31+ ssl_verify = False ,
32+ )
33+
2834
2935@fixture (scope = "session" )
3036def api_connector (api_client ):
You can’t perform that action at this time.
0 commit comments