Skip to content

Commit 6a5623b

Browse files
authored
test_: set proxy creds (#6211)
1 parent 2172abe commit 6a5623b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

_assets/ci/Jenkinsfile.tests-rpc

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ pipeline {
4747
credentialsId: 'codecov-repository-upload-token',
4848
variable: 'CODECOV_TOKEN'
4949
),
50+
usernamePassword(
51+
credentialsId: "api-proxy-devel",
52+
usernameVariable: 'STATUS_BUILD_PROXY_USER',
53+
passwordVariable: 'STATUS_BUILD_PROXY_PASSWORD'
54+
),
5055
]) {
5156
nix.shell('make test-functional', pure: false)
5257
}

tests-functional/clients/status_backend.py

+19
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,22 @@ def init_status_backend(self, data_dir=USER_DIR):
130130
}
131131
return self.api_valid_request(method, data)
132132

133+
def _set_proxy_credentials(self, data):
134+
if not "STATUS_BUILD_PROXY_USER" in os.environ:
135+
return data
136+
137+
user = os.environ["STATUS_BUILD_PROXY_USER"]
138+
password = os.environ["STATUS_BUILD_PROXY_PASSWORD"]
139+
140+
data["StatusProxyMarketUser"] = user
141+
data["StatusProxyMarketPassword"] = password
142+
data["StatusProxyBlockchainUser"] = user
143+
data["StatusProxyBlockchainPassword"] = password
144+
145+
data["StatusProxyEnabled"] = True
146+
data["StatusProxyStageName"] = "test"
147+
return data
148+
133149
def create_account_and_login(
134150
self,
135151
data_dir=USER_DIR,
@@ -146,6 +162,7 @@ def create_account_and_login(
146162
"logEnabled": True,
147163
"logLevel": "DEBUG",
148164
}
165+
data = self._set_proxy_credentials(data)
149166
return self.api_valid_request(method, data)
150167

151168
def restore_account_and_login(
@@ -183,6 +200,7 @@ def restore_account_and_login(
183200
}
184201
],
185202
}
203+
data = self._set_proxy_credentials(data)
186204
return self.api_valid_request(method, data)
187205

188206
def login(self, keyUid, user=user_1):
@@ -192,6 +210,7 @@ def login(self, keyUid, user=user_1):
192210
"keyUid": keyUid,
193211
"kdfIterations": 256000,
194212
}
213+
data = self._set_proxy_credentials(data)
195214
return self.api_valid_request(method, data)
196215

197216
def logout(self, user=user_1):

0 commit comments

Comments
 (0)