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

Check that Beat ships with the right binary #105

Merged
merged 2 commits into from
Jan 7, 2019
Merged
Changes from all commits
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
32 changes: 32 additions & 0 deletions roles/test-beat/tasks/common/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,35 @@
when:
- "version | version_compare('6.5', '>=')"
- ansible_system == "Linux"

- name: 'Get {{ beat_name }} help output for an unknown help topic'
shell: '{{ beat_name }} help non_existing_topic'
register: test_cmd_result

- name: 'Check that {{ beat_name }} reports unknown help topics'
assert:
that:
- "'Unknown help topic [`non_existing_topic`]' in test_cmd_result.stderr"

- name: 'Get {{ beat_name }} help output for an X-Pack feature'
shell: '{{ beat_name }} help enroll'
register: xpack_cmd_result
# The enroll command appeared in 6.5.
when:
- "version | version_compare('6.5', '>=')"

- name: 'Check that {{ beat_name }} contains X-Pack features'
assert:
that:
- "'Unknown help topic' not in xpack_cmd_result.stderr"
when:
- "version | version_compare('6.5', '>=')"
- "'oss' not in beat_pkg_suffix"

- name: 'Check that {{ beat_name }} contains OSS features only'
assert:
that:
- "'Unknown help topic [`enroll`]' in xpack_cmd_result.stderr"
when:
- "version | version_compare('6.5', '>=')"
- "'oss' in beat_pkg_suffix"