Update packaging tests for Log4j 2
This commit updates the packaging tests for Log4j 2. Namely, these tests make assertions about logging.yml that should now be about log4j2.properties.
This commit is contained in:
parent
750033dc4b
commit
07d1a72395
|
@ -133,7 +133,7 @@ setup() {
|
|||
assert_file_exist "/etc/elasticsearch"
|
||||
assert_file_exist "/etc/elasticsearch/elasticsearch.yml"
|
||||
assert_file_exist "/etc/elasticsearch/jvm.options"
|
||||
assert_file_exist "/etc/elasticsearch/logging.yml"
|
||||
assert_file_exist "/etc/elasticsearch/log4j2.properties"
|
||||
|
||||
# The env file is still here
|
||||
assert_file_exist "/etc/default/elasticsearch"
|
||||
|
@ -154,7 +154,7 @@ setup() {
|
|||
assert_file_not_exist "/etc/elasticsearch"
|
||||
assert_file_not_exist "/etc/elasticsearch/elasticsearch.yml"
|
||||
assert_file_not_exist "/etc/elasticsearch/jvm.options"
|
||||
assert_file_not_exist "/etc/elasticsearch/logging.yml"
|
||||
assert_file_not_exist "/etc/elasticsearch/log4j2.properties"
|
||||
|
||||
assert_file_not_exist "/etc/default/elasticsearch"
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ setup() {
|
|||
assert_file_not_exist "/etc/elasticsearch"
|
||||
assert_file_not_exist "/etc/elasticsearch/elasticsearch.yml"
|
||||
assert_file_not_exist "/etc/elasticsearch/jvm.options"
|
||||
assert_file_not_exist "/etc/elasticsearch/logging.yml"
|
||||
assert_file_not_exist "/etc/elasticsearch/log4j2.properties"
|
||||
|
||||
assert_file_not_exist "/etc/init.d/elasticsearch"
|
||||
assert_file_not_exist "/usr/lib/systemd/system/elasticsearch.service"
|
||||
|
@ -140,7 +140,7 @@ setup() {
|
|||
@test "[RPM] reremove package" {
|
||||
echo "# ping" >> "/etc/elasticsearch/elasticsearch.yml"
|
||||
echo "# ping" >> "/etc/elasticsearch/jvm.options"
|
||||
echo "# ping" >> "/etc/elasticsearch/logging.yml"
|
||||
echo "# ping" >> "/etc/elasticsearch/log4j2.properties"
|
||||
echo "# ping" >> "/etc/elasticsearch/scripts/script"
|
||||
rpm -e 'elasticsearch'
|
||||
}
|
||||
|
@ -163,8 +163,8 @@ setup() {
|
|||
assert_file_exist "/etc/elasticsearch/elasticsearch.yml.rpmsave"
|
||||
assert_file_not_exist "/etc/elasticsearch/jvm.options"
|
||||
assert_file_exist "/etc/elasticsearch/jvm.options.rpmsave"
|
||||
assert_file_not_exist "/etc/elasticsearch/logging.yml"
|
||||
assert_file_exist "/etc/elasticsearch/logging.yml.rpmsave"
|
||||
assert_file_not_exist "/etc/elasticsearch/log4j2.properties"
|
||||
assert_file_exist "/etc/elasticsearch/log4j2.properties.rpmsave"
|
||||
# older versions of rpm behave differently and preserve the
|
||||
# directory but do not append the ".rpmsave" suffix
|
||||
test -e "/etc/elasticsearch/scripts" || test -e "/etc/elasticsearch/scripts.rpmsave"
|
||||
|
|
|
@ -79,7 +79,7 @@ verify_package_installation() {
|
|||
assert_file "$ESHOME/lib" d root root 755
|
||||
assert_file "$ESCONFIG" d root elasticsearch 750
|
||||
assert_file "$ESCONFIG/elasticsearch.yml" f root elasticsearch 750
|
||||
assert_file "$ESCONFIG/logging.yml" f root elasticsearch 750
|
||||
assert_file "$ESCONFIG/log4j2.properties" f root elasticsearch 750
|
||||
assert_file "$ESSCRIPTS" d root elasticsearch 750
|
||||
assert_file "$ESDATA" d elasticsearch elasticsearch 755
|
||||
assert_file "$ESLOG" d elasticsearch elasticsearch 755
|
||||
|
|
|
@ -500,7 +500,7 @@ move_config() {
|
|||
mv "$oldConfig"/* "$ESCONFIG"
|
||||
chown -R elasticsearch:elasticsearch "$ESCONFIG"
|
||||
assert_file_exist "$ESCONFIG/elasticsearch.yml"
|
||||
assert_file_exist "$ESCONFIG/logging.yml"
|
||||
assert_file_exist "$ESCONFIG/log4j2.properties"
|
||||
}
|
||||
|
||||
# Copies a script into the Elasticsearch install.
|
||||
|
|
|
@ -86,7 +86,7 @@ verify_archive_installation() {
|
|||
assert_file "$ESHOME/bin/elasticsearch-plugin" f
|
||||
assert_file "$ESCONFIG" d
|
||||
assert_file "$ESCONFIG/elasticsearch.yml" f
|
||||
assert_file "$ESCONFIG/logging.yml" f
|
||||
assert_file "$ESCONFIG/log4j2.properties" f
|
||||
assert_file "$ESHOME/lib" d
|
||||
assert_file "$ESHOME/NOTICE.txt" f
|
||||
assert_file "$ESHOME/LICENSE.txt" f
|
||||
|
|
Loading…
Reference in New Issue