Skip to content

Commit

Permalink
[Test] Fix docs check for DEB package in packaging tests (#30126)
Browse files Browse the repository at this point in the history
The packaging tests for Debian based distro is loooking
for docs in /usr/share/elasticsearch, but it should be
/usr/share/elasticsearch-oss for the oss package.
  • Loading branch information
tlrx committed Apr 25, 2018
1 parent b675309 commit 5559c30
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ setup() {

assert_file_not_exist "/usr/share/elasticsearch"

assert_file_not_exist "/usr/share/doc/elasticsearch"
assert_file_not_exist "/usr/share/doc/elasticsearch/copyright"
assert_file_not_exist "/usr/share/doc/elasticsearch-oss"
assert_file_not_exist "/usr/share/doc/elasticsearch-oss/copyright"
}

@test "[DEB] package has been completly removed" {
Expand Down
7 changes: 4 additions & 3 deletions qa/vagrant/src/test/resources/packaging/utils/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ verify_package_installation() {
# Env file
assert_file "/etc/default/elasticsearch" f root elasticsearch 660

# Doc files
assert_file "/usr/share/doc/elasticsearch" d root root 755
assert_file "/usr/share/doc/elasticsearch/copyright" f root root 644
# Machine-readable debian/copyright file
local copyrightDir=$(readlink -f /usr/share/doc/$PACKAGE_NAME)
assert_file $copyrightDir d root root 755
assert_file "$copyrightDir/copyright" f root root 644
fi

if is_rpm; then
Expand Down
1 change: 1 addition & 0 deletions qa/vagrant/src/test/resources/packaging/utils/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ clean_before_test() {
"/etc/sysconfig/elasticsearch" \
"/var/run/elasticsearch" \
"/usr/share/doc/elasticsearch" \
"/usr/share/doc/elasticsearch-oss" \
"/tmp/elasticsearch" \
"/usr/lib/systemd/system/elasticsearch.conf" \
"/usr/lib/tmpfiles.d/elasticsearch.conf" \
Expand Down

0 comments on commit 5559c30

Please sign in to comment.