Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Fix docs check for DEB package in packaging tests #30126

Merged
merged 2 commits into from
Apr 25, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 3 additions & 2 deletions qa/vagrant/src/test/resources/packaging/utils/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ verify_package_installation() {
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
local docs=$(readlink -f /usr/share/doc/elasticsearch*)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really about docs since the only file that we put in this path is the copyright file on Debian-based systems only. I would prefer the name not be misleading about the contents of this directory.

Additionally, I think that we can use ${PACKAGE_NAME} instead of elasticsearch* here as that should be set appropriately.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you prefer copyrightDir instead of docs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked to Jason on another channel, ̀copyrightDir` is okay.

assert_file $docs d root root 755
assert_file "$docs/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 @@ -254,6 +254,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