Skip to content

Commit 470ae3d

Browse files
committed
refactor(core) : removed not necesary secrets
1 parent 63a8a3a commit 470ae3d

2 files changed

Lines changed: 7 additions & 82 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
name: Test Python SDK
22
on: [ push ]
33

4-
env:
5-
AUTH_ORIGIN: ${{ secrets.AUTH_ORIGIN }}
6-
CONVERSATION_ORIGIN: ${{ secrets.CONVERSATION_ORIGIN }}
7-
DISABLE_SSL: ${{ secrets.DISABLE_SSL }}
8-
KEY_ID: ${{ secrets.KEY_ID }}
9-
KEY_SECRET: ${{ secrets.KEY_SECRET }}
10-
NUMBERS_ORIGIN: ${{ secrets.NUMBERS_ORIGIN }}
11-
PROJECT_ID: ${{ secrets.PROJECT_ID }}
12-
SERVICE_PLAN_ID: ${{ secrets.SERVICE_PLAN_ID }}
13-
SMS_ORIGIN: ${{ secrets.SMS_ORIGIN }}
14-
TEMPLATES_ORIGIN: ${{ secrets.TEMPLATES_ORIGIN }}
15-
164
jobs:
175
build:
186
runs-on: ubuntu-latest
@@ -73,7 +61,7 @@ jobs:
7361
uses: actions/checkout@v4
7462
with:
7563
repository: sinch/sinch-sdk-mockserver
76-
token: ${{ secrets.PAT_CI }}
64+
token: ${{ secrets.MOCKSERVER_REPO_PAT_CI }}
7765
fetch-depth: 0
7866
path: sinch-sdk-mockserver
7967

tests/conftest.py

Lines changed: 6 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -34,72 +34,21 @@ class TokenBasedPaginationRequest(BaseModel):
3434
page_token: str = None
3535

3636

37-
def configure_origin(
38-
sinch_client,
39-
numbers_origin,
40-
conversation_origin,
41-
auth_origin,
42-
sms_origin
43-
):
44-
if auth_origin:
45-
sinch_client.configuration.auth_origin = auth_origin
46-
47-
if numbers_origin:
48-
sinch_client.configuration.numbers_origin = numbers_origin
49-
50-
if conversation_origin:
51-
sinch_client.configuration.conversation_origin = conversation_origin
52-
53-
if sms_origin:
54-
sinch_client.configuration.sms_origin = sms_origin
55-
sinch_client.configuration.sms_origin_with_service_plan_id = sms_origin
56-
57-
return sinch_client
58-
59-
6037
@pytest.fixture
6138
def key_id():
62-
return os.getenv("KEY_ID")
63-
39+
return "test_key_id"
6440

6541
@pytest.fixture
6642
def key_secret():
67-
return os.getenv("KEY_SECRET")
68-
43+
return "test_key_secret"
6944

7045
@pytest.fixture
7146
def project_id():
72-
return os.getenv("PROJECT_ID")
73-
74-
75-
@pytest.fixture
76-
def numbers_origin():
77-
return os.getenv("NUMBERS_ORIGIN")
78-
79-
80-
@pytest.fixture
81-
def conversation_origin():
82-
return os.getenv("CONVERSATION_ORIGIN")
83-
84-
85-
@pytest.fixture
86-
def auth_origin():
87-
return os.getenv("AUTH_ORIGIN")
88-
89-
90-
@pytest.fixture
91-
def sms_origin():
92-
return os.getenv("SMS_ORIGIN")
93-
94-
95-
@pytest.fixture
96-
def disable_ssl():
97-
return os.getenv("DISABLE_SSL")
98-
47+
return "test_project_id"
9948

10049
@pytest.fixture
10150
def service_plan_id():
102-
return os.getenv("SERVICE_PLAN_ID")
51+
return "test_service_plan_id"
10352

10453
@pytest.fixture
10554
def http_response():
@@ -155,29 +104,17 @@ def sms_pagination_request_data_with_page_and_page_size_none():
155104
return SMSBasePaginationRequest()
156105

157106

158-
159107
@pytest.fixture
160108
def sinch_client_sync(
161109
key_id,
162110
key_secret,
163-
numbers_origin,
164-
conversation_origin,
165-
auth_origin,
166-
sms_origin,
167111
project_id
168112
):
169-
return configure_origin(
170-
SinchClient(
113+
return SinchClient(
171114
key_id=key_id,
172115
key_secret=key_secret,
173116
project_id=project_id
174-
),
175-
numbers_origin,
176-
conversation_origin,
177-
auth_origin,
178-
sms_origin
179-
)
180-
117+
)
181118

182119
@pytest.fixture
183120
def mock_sinch_client_numbers():

0 commit comments

Comments
 (0)