Skip to content

Commit

Permalink
[test] packaging test logging for suse distros
Browse files Browse the repository at this point in the history
  • Loading branch information
andyb-elastic committed May 29, 2018
1 parent 544822c commit ba8bb1d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ setup() {
@test "[TAR] install archive" {
# Install the archive
install_archive
set_debug_logging

count=$(find /tmp -type d -name 'elasticsearch*' | wc -l)
[ "$count" -eq 1 ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ setup() {
[ ! -d "$ESHOME" ]; then
clean_before_test
install
set_debug_logging
fi
}

Expand Down
7 changes: 7 additions & 0 deletions qa/vagrant/src/test/resources/packaging/utils/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,13 @@ debug_collect_logs() {
describe_port 127.0.0.1 9201
}

set_debug_logging() {
if [ "$ESCONFIG" ] && [ -d "$ESCONFIG" ] && [ -f /etc/os-release ] && (grep -qi suse /etc/os-release); then
echo 'logger.org.elasticsearch.indices: DEBUG' >> "$ESCONFIG/elasticsearch.yml"
echo 'logger.org.elasticsearch.gateway: TRACE' >> "$ESCONFIG/elasticsearch.yml"
fi
}

# Waits for Elasticsearch to reach some status.
# $1 - expected status - defaults to green
wait_for_elasticsearch_status() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ setup() {

# Install the archive
install_archive
set_debug_logging
}

@test "[X-PACK] verify x-pack installation" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ setup() {
export PACKAGE_NAME="elasticsearch"
clean_before_test
install
set_debug_logging

generate_trial_license
verify_xpack_installation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ install_node_using_archive() {
export_elasticsearch_paths

install_archive
set_debug_logging
verify_archive_installation

export ESPLUGIN_COMMAND_USER=$DEFAULT_ARCHIVE_USER
Expand Down Expand Up @@ -123,6 +124,7 @@ install_node_using_package() {
export_elasticsearch_paths

install_package
set_debug_logging
verify_package_installation

export ESPLUGIN_COMMAND_USER=$DEFAULT_PACKAGE_USER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ setup() {
export PACKAGE_NAME="elasticsearch"
clean_before_test
install
set_debug_logging

generate_trial_license
verify_xpack_installation
Expand Down

0 comments on commit ba8bb1d

Please sign in to comment.