示例#1
0
def test_kibana_is_the_correct_version():
    assert kibana_version_string in stdout_of('kibana --version')
示例#2
0
def test_the_default_user_is_kibana():
    assert stdout_of('whoami') == 'kibana'
示例#3
0
def test_default_environment_contains_no_kibana_config():
    acceptable_vars = ['HOME', 'HOSTNAME', 'TERM', 'PATH']
    defined_vars = [line.split('=')[0] for line in stdout_of('env').split()]
    for var in defined_vars:
        assert var in acceptable_vars
示例#4
0
def test_all_files_in_optimize_directory_are_owned_by_kibana():
    bad_files = stdout_of(
        'find /usr/share/kibana/optimize ! -user kibana').split()
    assert len(bad_files) is 0
示例#5
0
def test_logstash_is_the_correct_version():
    assert logstash_version_string in stdout_of('logstash --version')
示例#6
0
def test_opt_kibana_is_a_symlink_to_usr_share_kibana():
    assert stdout_of('realpath /opt/kibana') == '/usr/share/kibana'
示例#7
0
def test_logging_config_does_not_log_to_files():
    assert stdout_of(
        'grep RollingFile /logstash/config/log4j2.properties') == ''
示例#8
0
def test_logstash_user_is_gid_1000():
    assert stdout_of('id -g logstash') == '1000'
示例#9
0
def test_all_logstash_files_are_owned_by_logstash():
    assert stdout_of('find /usr/share/logstash ! -user logstash') == ''
示例#10
0
def test_opt_logstash_is_a_symlink_to_usr_share_logstash():
    assert stdout_of('realpath /opt/logstash') == '/usr/share/logstash'
示例#11
0
def test_the_default_user_is_logstash():
    assert stdout_of('whoami') == 'logstash'