From a579a48948f0b61bb9d98e1591d1fe727a550dbb Mon Sep 17 00:00:00 2001 From: Eli Halych Date: Thu, 3 Dec 2020 09:56:50 +0000 Subject: 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 Change-Id: I69eaeb4b10f903c3a3aa880dbb787034da4c30bb --- test/mocks/masspnfsim/conftest.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'test/mocks/masspnfsim/conftest.py') 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): -- cgit 1.2.3-korg