Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci_: add proxy creds #6214

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions _assets/ci/Jenkinsfile.tests-rpc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env groovy
library '[email protected].6'
library '[email protected].16'

pipeline {
agent { label 'linux && x86_64 && nix-2.19' }
Expand Down Expand Up @@ -35,7 +35,7 @@ pipeline {
PKG_URL = "${currentBuild.absoluteUrl}/consoleText"

/* Hack-fix for params not being set in env on first job run. */
BRANCH = "${params.BRANCH}"
BRANCH = "${params.BRANCH}"
FUNCTIONAL_TESTS_REPORT_CODECOV = "${params.FUNCTIONAL_TESTS_REPORT_CODECOV}"
}

Expand All @@ -47,6 +47,11 @@ pipeline {
credentialsId: 'codecov-repository-upload-token',
variable: 'CODECOV_TOKEN'
),
usernamePassword(
credentialsId: "api-proxy-devel",
usernameVariable: 'STATUS_BUILD_PROXY_USER',
passwordVariable: 'STATUS_BUILD_PROXY_PASSWORD'
),
]) {
nix.shell('make test-functional', pure: false)
}
Expand Down
19 changes: 19 additions & 0 deletions tests-functional/clients/status_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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,
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down
Loading