def test_loggin_in_central_server_2_11_1(self): main = MainController(self) # Set test name and number main.test_number = '2.11.1' main.test_name = self.__class__.__name__ main.url = main.config.get('cs.host') main.username = main.config.get('cs.user') main.password = main.config.get('cs.pass') if main.driver is None: main.reset_webdriver(main.url, username=main.username, password=main.password, init_new_webdriver=False) group = main.config.get('cs.global_group') server_id = main.config.get('ss1.server_name') client_id = main.config.get('ss1.client2_id') client_name = main.config.get('ss1.client2_name') client_name2 = main.config.get('ss1.client2_name2') server_groups = '{0},{1},{2}'.format( main.config.get('xroad.registration_officer_group'), main.config.get('xroad.system_administrator_group'), main.config.get('xroad.security_officer_group')) users = { 'user1': { 'username': main.config.get('xroad.user1'), 'password': main.config.get('xroad.user1'), 'group': server_groups }, 'user2': { 'username': main.config.get('xroad.user2'), 'password': main.config.get('xroad.user2'), 'group': server_groups }, 'user3': { 'username': main.config.get('xroad.user3'), 'password': main.config.get('xroad.user3'), 'group': server_groups } } main.log('TEST: LOGGING TEST IN CENTRAL SERVER') test_func = logging_in_cs_2_11_1.test_test( main.config.get('cs.ssh_host'), main.config.get('cs.ssh_user'), main.config.get('cs.ssh_pass'), group=group, server_id=server_id, client_id=client_id, client_name=client_name, client_name2=client_name2, users=users) test_func(main) main.tearDown()
def test_parse_user_input_SS_41(self): main = MainController(self) # Set test name and number main.test_number = 'SS_41' main.test_name = self.__class__.__name__ main.log('TEST: PARSE USER INPUT') main.url = main.config.get('ss1.host') main.username = main.config.get('ss1.user') main.password = main.config.get('ss1.pass') main.reset_webdriver(main.url, main.username, main.password) test_func = parse_user_input_SS_41.test_01() test_func(main) test_func = parse_user_input_SS_41.test_02() test_func(main) test_func = parse_user_input_SS_41.test_03() test_func(main) test_func = parse_user_input_SS_41.test_04() test_func(main) test_func = parse_user_input_SS_41.test_05() test_func(main) test_func = parse_user_input_SS_41.test_06() test_func(main) main.tearDown() main.url = main.config.get('cs.host') main.username = main.config.get('cs.user') main.password = main.config.get('cs.pass') main.reset_webdriver(main.url, main.username, main.password) test_func = parse_user_input_SS_41.test_07() test_func(main) test_func = parse_user_input_SS_41.test_08() test_func(main) test_func = parse_user_input_SS_41.test_09() test_func(main) test_func = parse_user_input_SS_41.test_10() test_func(main) test_func = parse_user_input_SS_41.test_11() test_func(main) main.tearDown()
def get_main_object(self): main = MainController(self) # Set test name and number main.test_number = '2.1.9' main.test_name = self.__class__.__name__ main.url = main.config.get('ss1.host') username = main.config.get('ss1.user') password = main.config.get('ss1.pass') main.reset_webdriver(main.url, username=username, password=password) return main
def test_changing_database_rows_with_cs_gui_2_9_1(self): main = MainController(self) # Set test name and number main.test_number = '2.9.1' main.test_name = self.__class__.__name__ main.url = main.config.get('cs.host') main.reset_webdriver(main.url) groups = main.config.get('xroad.registration_officer_group') users = { 'user1': { 'username': main.config.get('xroad.user1'), 'password': main.config.get('xroad.user1'), 'group': groups }, 'user2': { 'username': main.config.get('xroad.user2'), 'password': main.config.get('xroad.user2'), 'group': groups }, 'user3': { 'username': main.config.get('xroad.user3'), 'password': main.config.get('xroad.user3'), 'group': groups }, 'databaseuser': { 'username': main.config.get('xroad.centerui_db_user'), 'password': main.config.get('xroad.centerui_db_pass'), 'db_name': main.config.get('xroad.centerui_db_name') } } client_id = main.config.get('ss1.client2_id') client_name = main.config.get('ss1.client2_name') client_name2 = main.config.get('ss1.client2_name3') main.log( 'TEST: CHANGING DATABASE ROWS WITH USER INTERFACE IN CENTRAL SERVER' ) test_func = changing_database_rows_with_cs_gui_2_9_1.test_test( ssh_host=main.config.get('cs.ssh_host'), ssh_username=main.config.get('cs.ssh_user'), ssh_password=main.config.get('cs.ssh_pass'), users=users, client_id=client_id, client_name=client_name, client_name2=client_name2) test_func(main) main.tearDown()
def test_client_deletion(self): main = MainController(self) # Set test name and number main.test_number = '2.2.1' main.test_name = self.__class__.__name__ main.url = main.config.get('cs.host') main.username = main.config.get('cs.user') main.password = main.config.get('cs.pass') main.reset_webdriver(url=main.url, username=main.username, password=main.password, close_previous=False, init_new_webdriver=False) main.management_services = xroad.split_xroad_subsystem( main.config.get('ss1.management_id')) cs_member = xroad.split_xroad_id(main.config.get('ss1.client_id')) ss1_client = xroad.split_xroad_id(main.config.get('ss1.client_id')) ss2_client = xroad.split_xroad_id(main.config.get('ss2.client_id')) ss2_client_2 = xroad.split_xroad_id(main.config.get('ss2.client2_id')) cs_member_name = main.config.get('ss1.client_name') ss1_client_name = main.config.get('ss1.client_name') ss2_client_name = main.config.get('ss2.client_name') ss2_client_2_name = main.config.get('ss2.client2_name') main.log('Removing added data from 2.2.1') test_func = client_registration_in_ss_2_2_1.test_remove( main.config.get('cs.host'), main.config.get('cs.user'), main.config.get('cs.pass'), main.config.get('ss1.host'), main.config.get('ss1.user'), main.config.get('ss1.pass'), main.config.get('ss2.host'), main.config.get('ss2.user'), main.config.get('ss2.pass'), cs_new_member=cs_member, cs_member_name=cs_member_name, ss1_client=ss1_client, ss1_client_name=ss1_client_name, ss2_client=ss2_client, ss2_client_name=ss2_client_name, ss2_client_2=ss2_client_2, ss2_client_2_name=ss2_client_2_name) test_func(main) main.tearDown()
def test_registration_failures_213(self): main = MainController(self) # Set test name and number main.test_number = '2.1.3' main.test_name = self.__class__.__name__ main.url = main.config.get('ss1.host') main.username = main.config.get('ss1.user') main.password = main.config.get('ss1.pass') main.reset_webdriver(main.url, main.username, main.password) main.log('TEST: CERTIFYING SECURITY SERVER CLIENTS FAILURES') fail_test_func = client_certification_2_1_3.failing_tests() fail_test_func(main) main.tearDown()
def test_changing_database_rows_with_ss_gui_2_10_1(self): main = MainController(self) # Set test name and number main.test_number = '2.10.1' main.test_name = self.__class__.__name__ main.url = main.config.get('ss1.host') if main.driver is None: main.reset_webdriver(main.url, init_new_webdriver=False) users = { 'user1': { 'username': main.config.get('xroad.user1'), 'password': main.config.get('xroad.user1'), 'group': main.config.get('xroad.registration_officer_group') }, 'user2': { 'username': main.config.get('xroad.user2'), 'password': main.config.get('xroad.user2'), 'group': main.config.get('xroad.registration_officer_group') }, 'user3': { 'username': main.config.get('xroad.user3'), 'password': main.config.get('xroad.user3'), 'group': main.config.get('xroad.registration_officer_group') }, 'databaseuser': { 'username': main.config.get('xroad.serverconf_db_user'), 'password': main.config.get('xroad.serverconf_db_password'), 'db_name': main.config.get('xroad.serverconf_db_name') } } client_id = main.config.get('ss1.client3_id') main.log( 'TEST: CHANGING DATABASE ROWS WITH USER INTERFACE IN SECURITY SERVER' ) test_func = changing_database_rows_with_ss_gui_2_10_1.test_test( ssh_host=main.config.get('ss1.ssh_host'), ssh_username=main.config.get('ss1.ssh_user'), ssh_password=main.config.get('ss1.ssh_pass'), users=users, client_id=client_id) test_func(main) main.tearDown()
def test_security_server_client_registration_2_1_3(self): main = MainController(self) # Set test name and number main.test_number = '2.1.3' main.test_name = self.__class__.__name__ main.url = main.config.get('ss2.host') main.username = main.config.get('ss2.user') main.password = main.config.get('ss2.pass') main.reset_webdriver(main.url, main.username, main.password) main.log('TEST: CERTIFYING SECURITY SERVER CLIENTS') # ss1_client = xroad.split_xroad_id('SUBSYSTEM : XTEE-CI-XM : GOV : 00000001 : MockSystemGatling') test_func = client_certification_2_1_3.test('00000001', 'GOV') test_func(main) main.tearDown()
def test_loggin_in_security_server_2_11_2(self): main = MainController(self) # Set test name and number main.test_number = '2.11.2' main.test_name = self.__class__.__name__ main.url = main.config.get('cs.host') main.username = main.config.get('cs.user') main.password = main.config.get('cs.pass') if main.driver is None: main.reset_webdriver(main.url, username=main.username, password=main.password, init_new_webdriver=False) groups = '{0},{1}'.format( main.config.get('xroad.registration_officer_group'), main.config.get('xroad.service_administrator_group')) main.xroad_audit_log = LOG_FILE_LOCATION users = { 'user1': { 'username': main.config.get('xroad.user1'), 'password': main.config.get('xroad.user1'), 'group': groups }, 'user2': { 'username': main.config.get('xroad.user2'), 'password': main.config.get('xroad.user2'), 'group': groups }, 'user3': { 'username': main.config.get('xroad.user3'), 'password': main.config.get('xroad.user3'), 'group': groups } } client_id = main.config.get('ss1.client2_id') client_name = main.config.get('ss1.client2_name') wsdl_url = main.config.get('wsdl.remote_path').format( main.config.get('wsdl.service_wsdl')) main.driver.get(main.url) main.login(main.username, main.password) main.log('TEST: LOGGING TEST IN SECURITY SERVER') test_func = logging_service_ss_2_11_2.test_test( ssh_host=main.config.get('ss1.ssh_host'), ssh_username=main.config.get('ss1.ssh_user'), ssh_password=main.config.get('ss1.ssh_pass'), cs_host=main.config.get('cs.host'), cs_username=main.config.get('cs.user'), cs_password=main.config.get('cs.pass'), sec_host=main.config.get('ss1.host'), sec_username=main.config.get('ss1.user'), sec_password=main.config.get('ss1.pass'), users=users, client_id=client_id, client_name=client_name, wsdl_url=wsdl_url) test_func(main) main.tearDown()