aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/masspnfsim/conftest.py
diff options
context:
space:
mode:
authorEli Halych <eli.halych@gmail.com>2020-12-03 09:56:50 +0000
committerEli Halych <illia.halych@t-mobile.pl>2020-12-04 00:42:11 +0000
commita579a48948f0b61bb9d98e1591d1fe727a550dbb (patch)
tree7abd52518d5f5233a8e48440b7c6f952edbe7d72 /test/mocks/masspnfsim/conftest.py
parent59305b4e52464023a6350a1d69ced2eb23dee73e (diff)
Add send requests to VES via HTTPS in Mass PNF Simulator
Details: - Previously allowed only HTTP. - HTTPS support added since VES accepts HTTPS and throws 400 Bad Request on HTTP. - Added autogenerating Basic Authorization token based on user:password in Base64 to access real VES together with HTTPS. - For this reason, simple HttpClient became part of RestTemplate that can ignore certificate checks for HTTPS when connecting to VES. - Adjusted test cases. Issue-ID: INT-1799 Signed-off-by: Eli Halych <illia.halych@t-mobile.pl> Change-Id: I69eaeb4b10f903c3a3aa880dbb787034da4c30bb
Diffstat (limited to 'test/mocks/masspnfsim/conftest.py')
-rw-r--r--test/mocks/masspnfsim/conftest.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/mocks/masspnfsim/conftest.py b/test/mocks/masspnfsim/conftest.py
index e6ee05667..3d9dbcc2a 100644
--- a/test/mocks/masspnfsim/conftest.py
+++ b/test/mocks/masspnfsim/conftest.py
@@ -12,8 +12,8 @@ def args_bootstrap(parser):
return parser.parse_args(['bootstrap', '--count', str(SIM_INSTANCES),
'--urlves', URLVES, '--ipfileserver', IPFILESERVER,
'--typefileserver', TYPEFILESERVER, '--ipstart',
- IPSTART, '--user', FILESERVER_USER, '--password',
- FILESERVER_PASSWORD])
+ IPSTART, '--user', USER, '--password',
+ PASSWORD])
@pytest.fixture(scope="module")
def args_start(parser):
@@ -29,11 +29,16 @@ def args_status(parser):
@pytest.fixture(scope="module")
def args_trigger(parser):
- return parser.parse_args(['trigger'])
+ return parser.parse_args(['trigger', '--user', USER, '--password', PASSWORD])
@pytest.fixture(scope="module")
def args_trigger_custom(parser):
- return parser.parse_args(['trigger_custom', '--triggerstart', '0', '--triggerend', str(SIM_INSTANCES-1)])
+ return parser.parse_args([
+ 'trigger_custom',
+ '--triggerstart', '0',
+ '--triggerend', str(SIM_INSTANCES-1),
+ '--user', USER,
+ '--password', PASSWORD])
@pytest.fixture(scope="module")
def args_stop_simulator(parser):