Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Commit

Permalink
fix test scenario "latest"
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Aug 20, 2019
1 parent 4b43b69 commit cc22a57
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions molecule/latest/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@
- ansible-alertmanager
vars:
alertmanager_version: latest
alertmanager_slack_api_url: "http://example.com"
alertmanager_receivers:
- name: slack
slack_configs:
- send_resolved: true
channel: '#alerts'
alertmanager_route:
group_by: ['alertname', 'cluster', 'service']
group_wait: 30s
group_interval: 5m
repeat_interval: 3h
receiver: slack
10 changes: 5 additions & 5 deletions molecule/latest/tests/test_latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@


@pytest.mark.parametrize("files", [
"/etc/systemd/system/prometheus.service",
"/usr/local/bin/prometheus",
"/usr/local/bin/promtool"
"/etc/systemd/system/alertmanager.service",
"/usr/local/bin/alertmanager",
"/usr/local/bin/amtool"
])
def test_files(host, files):
f = host.file(files)
Expand All @@ -18,11 +18,11 @@ def test_files(host, files):


def test_service(host):
s = host.service("prometheus")
s = host.service("alertmanager")
# assert s.is_enabled
assert s.is_running


def test_socket(host):
s = host.socket("tcp://0.0.0.0:9090")
s = host.socket("tcp://0.0.0.0:9093")
assert s.is_listening

0 comments on commit cc22a57

Please sign in to comment.