Exemplo n.º 1
0
def test_xpack_enabled_to_xpack_security_enabled_update_matrix() -> None:
    from_version = "2.4.0-5.6.9"
    to_version = "2.5.0-6.3.2"

    # Updating from X-Pack 'enabled' to X-Pack Security 'enabled' (the default) is more involved
    # than the other cases, so we use `test_upgrade_from_xpack_enabled`.
    log.info("Updating X-Pack from 'enabled' to X-Pack Security 'enabled'")
    config.test_upgrade_from_xpack_enabled(
        config.PACKAGE_NAME,
        foldered_name,
        {"elasticsearch": {
            "xpack_security_enabled": True
        }},
        expected_task_count,
        from_version=from_version,
        to_version=to_version,
    )

    log.info("Updating from X-Pack to 'enabled' to X-Pack Security 'disabled'")
    config.test_xpack_enabled_update(foldered_name, True, False, from_version,
                                     to_version)

    log.info("Updating from X-Pack to 'disabled' to X-Pack Security 'enabled'")
    config.test_xpack_enabled_update(foldered_name, False, True, from_version,
                                     to_version)

    log.info(
        "Updating from X-Pack to 'disabled' to X-Pack Security 'disabled'")
    config.test_xpack_enabled_update(foldered_name, False, False, from_version,
                                     to_version)
Exemplo n.º 2
0
def test_xpack_update_matrix():
    # Since this test uninstalls the Elastic service that is shared between all previous tests,
    # reset the number of expected tasks to the default value. This is checked before all tests
    # by the `pre_test_setup` fixture.
    global current_expected_task_count
    current_expected_task_count = config.DEFAULT_TASK_COUNT

    log.info("Updating X-Pack from 'enabled' to 'enabled'")
    config.test_xpack_enabled_update(foldered_name, True, True)

    log.info("Updating X-Pack from 'enabled' to 'disabled'")
    config.test_xpack_enabled_update(foldered_name, True, False)

    log.info("Updating X-Pack from 'disabled' to 'enabled'")
    config.test_xpack_enabled_update(foldered_name, False, True)

    log.info("Updating X-Pack from 'disabled' to 'disabled'")
    config.test_xpack_enabled_update(foldered_name, False, False)
Exemplo n.º 3
0
def test_xpack_update_matrix() -> None:
    # Updating from X-Pack 'enabled' to X-Pack security 'enabled' (the default) is more involved
    # than the other cases, so we use `test_upgrade_from_xpack_enabled`.
    log.info("Updating X-Pack from 'enabled' to 'enabled'")
    config.test_upgrade_from_xpack_enabled(
        config.PACKAGE_NAME,
        foldered_name,
        {"elasticsearch": {
            "xpack_enabled": True
        }},
        expected_task_count,
    )

    log.info("Updating X-Pack from 'enabled' to 'disabled'")
    config.test_xpack_enabled_update(foldered_name, True, False)

    log.info("Updating X-Pack from 'disabled' to 'enabled'")
    config.test_xpack_enabled_update(foldered_name, False, True)

    log.info("Updating X-Pack from 'disabled' to 'disabled'")
    config.test_xpack_enabled_update(foldered_name, False, False)
Exemplo n.º 4
0
def test_xpack_enabled_to_xpack_security_enabled_update_matrix() -> None:
    from_version = "2.4.0-5.6.9"
    to_version = "2.5.0-6.3.2"

    # Updating from X-Pack 'enabled' to X-Pack Security 'enabled' (the default) is more involved
    # than the other cases, so we use `test_upgrade_from_xpack_enabled`.
    log.info("Updating X-Pack from 'enabled' to X-Pack Security 'enabled'")
    config.test_upgrade_from_xpack_enabled(
        config.PACKAGE_NAME,
        foldered_name,
        {"elasticsearch": {"xpack_security_enabled": True}},
        expected_task_count,
        from_version=from_version,
        to_version=to_version,
    )

    log.info("Updating from X-Pack to 'enabled' to X-Pack Security 'disabled'")
    config.test_xpack_enabled_update(foldered_name, True, False, from_version, to_version)

    log.info("Updating from X-Pack to 'disabled' to X-Pack Security 'enabled'")
    config.test_xpack_enabled_update(foldered_name, False, True, from_version, to_version)

    log.info("Updating from X-Pack to 'disabled' to X-Pack Security 'disabled'")
    config.test_xpack_enabled_update(foldered_name, False, False, from_version, to_version)