diff --git a/tests-functional/clients/status_backend.py b/tests-functional/clients/status_backend.py index b0481c7eea..6dd45af110 100644 --- a/tests-functional/clients/status_backend.py +++ b/tests-functional/clients/status_backend.py @@ -133,6 +133,22 @@ def init_status_backend(self, data_dir=USER_DIR): } return self.api_valid_request(method, data) + def _set_proxy_credentials(self, data): + # if not "STATUS_BUILD_PROXY_USER" in os.environ: + # return data + + user = os.environ["STATUS_BUILD_PROXY_USER"] + password = os.environ["STATUS_BUILD_PROXY_PASSWORD"] + + data["StatusProxyMarketUser"] = user + data["StatusProxyMarketPassword"] = password + data["StatusProxyBlockchainUser"] = user + data["StatusProxyBlockchainPassword"] = password + + data["StatusProxyEnabled"] = True + data["StatusProxyStageName"] = "test" + return data + def create_account_and_login(self, data_dir=USER_DIR, display_name=DEFAULT_DISPLAY_NAME, password=user_1.password): method = "CreateAccountAndLogin" data = { @@ -144,6 +160,7 @@ def create_account_and_login(self, data_dir=USER_DIR, display_name=DEFAULT_DISPL "logEnabled": True, "logLevel": "DEBUG", } + data = self._set_proxy_credentials(data) return self.api_valid_request(method, data) def restore_account_and_login(self, data_dir=USER_DIR, display_name=DEFAULT_DISPLAY_NAME, user=user_1, @@ -176,6 +193,7 @@ def restore_account_and_login(self, data_dir=USER_DIR, display_name=DEFAULT_DISP } ] } + data = self._set_proxy_credentials(data) return self.api_valid_request(method, data) def login(self, keyUid, user=user_1): @@ -185,6 +203,7 @@ def login(self, keyUid, user=user_1): "keyUid": keyUid, "kdfIterations": 256000, } + data = self._set_proxy_credentials(data) return self.api_valid_request(method, data) def logout(self, user=user_1):