Beispiel #1
0
def test_elasticsearch_default(docker_cli, image, run_user):
    container = run_image(docker_cli, image, user=run_user)
    _jvm = wait_for_proc(container, get_bootstrap_proc(container))

    procs_list = get_procs(container)
    start_bitbucket = [
        proc for proc in procs_list if 'start-bitbucket.sh' in proc
    ][0]
    assert '--no-search' not in start_bitbucket

    _es_jvm = wait_for_proc(container,
                            'org.elasticsearch.bootstrap.Elasticsearch')
Beispiel #2
0
def test_application_mode_mirror(docker_cli, image, run_user):
    environment = {'APPLICATION_MODE': 'mirror'}
    container = run_image(docker_cli,
                          image,
                          user=run_user,
                          environment=environment)
    _jvm = wait_for_proc(container, get_bootstrap_proc(container))

    procs_list = get_procs(container)
    start_bitbucket = [
        proc for proc in procs_list if 'start-bitbucket.sh' in proc
    ][0]
    assert '--no-search' in start_bitbucket
Beispiel #3
0
def test_elasticsearch_disabled(docker_cli, image, run_user):
    environment = {'ELASTICSEARCH_ENABLED': 'false'}
    container = run_image(docker_cli,
                          image,
                          user=run_user,
                          environment=environment)
    _jvm = wait_for_proc(container, get_bootstrap_proc(container))

    procs_list = get_procs(container)
    start_bitbucket = [
        proc for proc in procs_list if 'start-bitbucket.sh' in proc
    ][0]
    assert '--no-search' in start_bitbucket
Beispiel #4
0
def test_jvm_support_recommended_args_order(docker_cli, image):
    ENABLE_PRINTGCDETAILS = '-XX:+PrintGCDetails'
    DISABLE_PRINTGCDETAILS = '-XX:-PrintGCDetails'
    environment = {
        'JVM_SUPPORT_RECOMMENDED_ARGS': ENABLE_PRINTGCDETAILS,
    }
    container = run_image(docker_cli, image, environment=environment)
    _jvm = wait_for_proc(container, get_bootstrap_proc(container))

    procs_list = get_procs(container)
    jvm = [
        proc for proc in procs_list if get_bootstrap_proc(container) in proc
    ][0]
    assert jvm.index(ENABLE_PRINTGCDETAILS) > jvm.index(DISABLE_PRINTGCDETAILS)
Beispiel #5
0
def test_jvm_args(docker_cli, image, run_user):
    environment = {
        'JVM_MINIMUM_MEMORY': '383m',
        'JVM_MAXIMUM_MEMORY': '2047m',
        'JVM_SUPPORT_RECOMMENDED_ARGS': '-verbose:gc',
    }
    container = run_image(docker_cli, image, user=run_user, environment=environment)
    _jvm = wait_for_proc(container, get_bootstrap_proc(container))
    
    procs_list = get_procs(container)
    jvm = [proc for proc in procs_list if get_bootstrap_proc(container) in proc][0]
    
    assert f'-Xms{environment.get("JVM_MINIMUM_MEMORY")}' in jvm
    assert f'-Xmx{environment.get("JVM_MAXIMUM_MEMORY")}' in jvm
    assert environment.get('JVM_SUPPORT_RECOMMENDED_ARGS') in jvm