From 556ea1bec0165e74e66c48b19bcd8cfd4bbe30f3 Mon Sep 17 00:00:00 2001 From: Carina Antunes <carinadeoliveiraantunes@gmail.com> Date: Wed, 3 Nov 2021 10:57:44 +0100 Subject: [PATCH] wip --- Python/stress-testing/README.md | 3 ++- Python/stress-testing/api_library/config.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Python/stress-testing/README.md b/Python/stress-testing/README.md index fa56b27..063e53c 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 6b3327d..a39266c 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.""" -- GitLab