diff --git a/Python/stress-testing/README.md b/Python/stress-testing/README.md index fa56b27df2aff1415c485c2a85c5ff795a55f76f..063e53c04e2aa8a553eaad369009b450da371184 100644 --- a/Python/stress-testing/README.md +++ b/Python/stress-testing/README.md @@ -5,11 +5,12 @@ Tool to stress test Notification service. Steps: - Needs https://gitlab.cern.ch/authzsvc/tools/auth-get-sso-cookie/ - Works on LXPLUS for example +- kinit - Edit ```clientapp_name``` and ```audience``` in ```get_api_token.py``` depending on your target (dev, qa, prod) Usage: ``` -stress_testing.py -c <countchannels> -n <count notifications> +python stress_testing.py -c <countchannels> -n <count notifications> -c <countchannels> : number of test channels to create -n <countnotifications> : number of test notifications to send per channel ``` \ No newline at end of file diff --git a/Python/stress-testing/api_library/config.py b/Python/stress-testing/api_library/config.py index 6b3327d3dc6772b02347af7542c3c49b1e759104..a39266c559c11da37cdcc6a6b825c16abec289ea 100644 --- a/Python/stress-testing/api_library/config.py +++ b/Python/stress-testing/api_library/config.py @@ -1,13 +1,13 @@ -#from get_api_token import get_api_token +from .get_api_token import get_api_token import subprocess import datetime from multiprocessing import Lock # Comment this out on a kerberize machine and use import above -def get_api_token(): - print("Requesting a new token via ssh") - result = subprocess.run(['sshpass -f ~/password ssh ormancey@lxplus.cern.ch "python notificationApiClient/get-api-token.py"'], stdout=subprocess.PIPE, shell=True) - return result.stdout.decode().replace("\n", "") +# def get_api_token(): +# print("Requesting a new token via ssh") +# result = subprocess.run(['sshpass -f ~/password ssh ormancey@lxplus.cern.ch "python notificationApiClient/get-api-token.py"'], stdout=subprocess.PIPE, shell=True) +# return result.stdout.decode().replace("\n", "") class Config: """App configuration."""