Beispiel #1
0
def test_tomcat_7_version(jdk):

    from fabtools.require.tomcat import installed
    from fabtools.tomcat import version, DEFAULT_VERSION

    installed()

    assert is_file(os.path.join(PATH, 'bin/catalina.sh'))
    assert version(PATH) == DEFAULT_VERSION
def should_verify_tomcat_7_version(path="/usr/share/tomcat"):
    """
    Test high level API
    """

    require.oracle_jdk.installed()
    require.tomcat.installed()

    assert is_file(os.path.join(path, 'bin/catalina.sh'))
    assert tomcat.DEFAULT_VERSION == tomcat.version(path)
Beispiel #3
0
def test_tomcat_6_version(jdk):

    TOMCAT6_VERSION = '6.0.36'

    from fabtools.require.tomcat import installed
    from fabtools.tomcat import version

    installed(version=TOMCAT6_VERSION)

    assert is_file(os.path.join(PATH, 'bin/catalina.sh'))
    assert version(PATH) == TOMCAT6_VERSION
def should_verify_tomcat_6_version(path="/usr/share/tomcat"):
    """
    Test high level API
    """
    tomcat6 = '6.0.36'

    require.oracle_jdk.installed()
    require.tomcat.installed(version=tomcat6)

    assert is_file(os.path.join(path, 'bin/catalina.sh'))
    assert tomcat6 == tomcat.version(path)
def installed(version=tomcat.DEFAULT_VERSION):
    """
    Require Tomcat to be installed.

    ::

        from fabtools import require

        require.tomcat.installed()

    """
    if tomcat.version(tomcat.DEFAULT_INSTALLATION_PATH) != version:
        tomcat.install_from_source(version=version, overwrite=True)