Пример #1
0
def test_deploy_driver(provider, driver):
    """Tests Deployment of provided JDBC Driver into EAP7 server

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Selects JDBC driver file to upload.
        * Input Driver Name.
        * Input Module Name.
        * Input Driver Name.
        * Input Driver Class.
        * Input Major Version.
        * Input Minor Version.
        * Submits the form.
        * Checks that notification message is shown.
    """
    server = get_eap_server(provider)
    file_path = download_jdbc_driver(driver.database_name)
    deploy_jdbc_driver(provider,
                       server,
                       file_path,
                       driver_name=driver.driver_name,
                       module_name=driver.module_name,
                       driver_class=driver.driver_class,
                       xa_class=driver.xa_class,
                       major_version=driver.major_version,
                       minor_version=driver.minor_version)
def test_create_datasource_select_driver(provider, datasource):
    """Tests datasource creation and deletion on EAP server
    Method is executed for all database types

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Fills all necessary fields and saves
        * Invokes 'Add Datasource' toolbar operation
        * Selects Datasource type.
        * Click Next.
        * Input Datasource Name.
        * Input Datasource JNDI Name.
        * Click Next.
        * Choose the tab "Existing Driver".
        * Select just created driver
        * Click Next.
        * Input Database Connection URL.
        * Input Database username.
        * Input Database password.
        * Submits the form.
        * Checks if newly created datasource is listed.
    """
    server = get_eap_server(provider)
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       xa_class=datasource.driver.xa_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    verify_server_running(provider, server)
    verify_driver_listed(provider, datasource, server)
def test_deploy_driver(provider, driver):
    """Tests Deployment of provided JDBC Driver into EAP7 server

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Selects JDBC driver file to upload.
        * Input Driver Name.
        * Input Module Name.
        * Input Driver Name.
        * Input Driver Class.
        * Input Major Version.
        * Input Minor Version.
        * Submits the form.
        * Checks that notification message is shown.
    """
    server = get_eap_server(provider)
    file_path = download_jdbc_driver(driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=driver.driver_name,
                       module_name=driver.module_name,
                       driver_class=driver.driver_class,
                       xa_class=driver.xa_class,
                       major_version=driver.major_version,
                       minor_version=driver.minor_version)
Пример #4
0
def test_create_datasource_select_driver(provider, datasource):
    """Tests datasource creation and deletion on EAP server
    Method is executed for all database types

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Fills all necessary fields and saves
        * Invokes 'Add Datasource' toolbar operation
        * Selects Datasource type.
        * Click Next.
        * Input Datasource Name.
        * Input Datasource JNDI Name.
        * Click Next.
        * Choose the tab "Existing Driver".
        * Select just created driver
        * Click Next.
        * Input Database Connection URL.
        * Input Database username.
        * Input Database password.
        * Submits the form.
        * Checks if newly created datasource is listed.
    """
    server = get_eap_server(provider)
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       xa_class=datasource.driver.xa_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    verify_server_running(provider, server)
    verify_driver_listed(provider, datasource, server)
def test_create_delete_xa_datasource(provider, datasource):
    """Tests XA datasource creation and deletion on EAP server
    Method is executed for all database types

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Fills all necessary fields and saves
        * Invokes 'Add Datasource' toolbar operation
        * Selects Datasource type.
        * Selects XA Datasource type.
        * Click Next.
        * Input Datasource Name.
        * Input Datasource JNDI Name.
        * Click Next.
        * Input Driver Name.
        * Input Module Name.
        * Input Driver Name.
        * Input Driver Class.
        * Click Next.
        * Input Database Connection URL.
        * Input Database username.
        * Input Database password.
        * Submits the form.
        * Checks if newly created datasource is listed. Selects it.
        * Deletes that Datasource via UI operation.
        * Checks whether resource is deleted.
    """
    server = get_eap_server(provider)
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider,
                       server,
                       file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    server.add_datasource(ds_type='{} XA'.format(datasource.database_type),
                          ds_name='{}XA'.format(datasource.datasource_name),
                          jndi_name='{}XA'.format(datasource.jndi_name),
                          xa_ds=True,
                          driver_name=datasource.driver.driver_name,
                          driver_module_name=datasource.driver.module_name,
                          driver_class=datasource.driver.xa_class,
                          ds_url=datasource.connection_url.replace("\\", ""),
                          username=datasource.username,
                          password=datasource.password)
    datasource_name = "XA Datasource [{}XA]".format(datasource.datasource_name)
    verify_datasource_listed(provider, datasource_name, server)
    delete_datasource(provider, server, datasource_name)
    verify_datasource_not_listed(provider, datasource_name)
def test_create_delete_datasource(provider):
    """Tests datasource creation and deletion on EAP server

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Fills all necessary fields and saves
        * Invokes 'Add Datasource' toolbar operation
        * Selects Datasource type.
        * Click Next.
        * Input Datasource Name.
        * Input Datasource JNDI Name.
        * Click Next.
        * Input Driver Name.
        * Input Module Name.
        * Input Driver Name.
        * Input Driver Class.
        * Click Next.
        * Input Database Connection URL.
        * Input Database username.
        * Input Database password.
        * Submits the form.
        * Checks if newly created datasource is listed. Selects it.
        * Deletes that Datasource via UI operation.
        * Checks whether resource is deleted.
    """
    server = get_eap_server(provider)
    datasource = ORACLE_12C_DS
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       xa_class=datasource.driver.xa_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    server.add_datasource(ds_type=datasource.database_type,
                          ds_name=datasource.datasource_name,
                          jndi_name=datasource.jndi_name,
                          driver_name=datasource.driver.driver_name,
                          driver_module_name=datasource.driver.module_name,
                          driver_class=datasource.driver.driver_class,
                          ds_url=datasource.connection_url.replace("\\", ""),
                          username=datasource.username,
                          password=datasource.password)
    datasource_name = "Datasource [{}]".format(datasource.datasource_name)
    verify_datasource_listed(provider, datasource_name, server)
    """ @TODO enable when BZ#1460296 is fixed
def test_create_xa_datasource(provider, datasource):
    """Tests XA datasource creation and deletion on EAP server
    Method is executed for all database types

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Fills all necessary fields and saves
        * Invokes 'Add Datasource' toolbar operation
        * Selects Datasource type.
        * Selects XA Datasource type.
        * Click Next.
        * Input Datasource Name.
        * Input Datasource JNDI Name.
        * Click Next.
        * Input Driver Name.
        * Input Module Name.
        * Input Driver Name.
        * Input Driver Class.
        * Click Next.
        * Input Database Connection URL.
        * Input Database username.
        * Input Database password.
        * Submits the form.
        * Checks if newly created datasource is listed.
    """
    server = get_eap_server(provider)
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       xa_class=datasource.driver.xa_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    server.add_datasource(ds_type='{} XA'.format(datasource.database_type),
                          ds_name='{}XA'.format(datasource.datasource_name),
                          jndi_name='{}XA'.format(datasource.jndi_name),
                          xa_ds=True,
                          driver_name=datasource.driver.driver_name,
                          driver_module_name=datasource.driver.module_name,
                          driver_class=datasource.driver.xa_class,
                          ds_url=datasource.connection_url.replace("\\", ""),
                          username=datasource.username,
                          password=datasource.password)
    datasource_name = "XA Datasource [{}XA]".format(datasource.datasource_name)
    verify_datasource_listed(provider, datasource_name, server)
def test_deploy_driver(provider, database_params):
    """Tests Deployment of provided JDBC Driver into EAP7 server

    Steps:
        * Get servers list from UI
        * Chooses JBoss EAP server from list
        * Invokes 'Add JDBC Driver' toolbar operation
        * Selects JDBC driver file to upload.
        * Input Driver Name.
        * Input Module Name.
        * Input Driver Name.
        * Input Driver Class.
        * Input Major Version.
        * Input Minor Version.
        * Submits the form.
        * Checks that notification message is shown.
    """
    server = get_server(provider, EAP_PRODUCT_NAME)
    file_path = download_jdbc_driver(database_params[0])
    deploy_jdbc_driver(provider, server, file_path, driver_name=database_params[1],
                       module_name=database_params[2], driver_class=database_params[3],
                       major_version=database_params[4], minor_version=database_params[5])
def gen_ds_creation_events(provider, datasource):
    server = get_eap_server(provider)
    ds_name = generate_ds_name(datasource.datasource_name)
    jndi_name = generate_ds_name(datasource.jndi_name)
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    server.add_datasource(ds_type=datasource.database_type,
                          ds_name=ds_name,
                          jndi_name=jndi_name,
                          driver_name=datasource.driver.driver_name,
                          driver_module_name=datasource.driver.module_name,
                          driver_class=datasource.driver.driver_class,
                          ds_url=datasource.connection_url.replace("\\", ""),
                          username=datasource.username,
                          password=datasource.password)
    ds_name = "Datasource [{}]".format(ds_name)
    return ds_name
Пример #10
0
def gen_ds_creation_events(provider, datasource):
    server = get_eap_server(provider)
    ds_name = generate_ds_name(datasource.datasource_name)
    jndi_name = generate_ds_name(datasource.jndi_name)
    file_path = download_jdbc_driver(datasource.driver.database_name)
    deploy_jdbc_driver(provider, server, file_path,
                       driver_name=datasource.driver.driver_name,
                       module_name=datasource.driver.module_name,
                       driver_class=datasource.driver.driver_class,
                       major_version=datasource.driver.major_version,
                       minor_version=datasource.driver.minor_version)
    server.add_datasource(ds_type=datasource.database_type,
                          ds_name=ds_name,
                          jndi_name=jndi_name,
                          driver_name=datasource.driver.driver_name,
                          driver_module_name=datasource.driver.module_name,
                          driver_class=datasource.driver.driver_class,
                          ds_url=datasource.connection_url.replace("\\", ""),
                          username=datasource.username,
                          password=datasource.password)
    ds_name = "Datasource [{}]".format(ds_name)
    return ds_name