-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testinfra (#44): mananged components now create simple file at /opt/a…
…lb/info/ to allow tests know what to check
- Loading branch information
Showing
11 changed files
with
134 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,5 @@ | |
mode: '0644' | ||
backup: yes | ||
notify: | ||
- reload openresty | ||
- "reload openresty" | ||
- "info alb component openresty" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ | |
mode: '0644' | ||
backup: yes | ||
notify: | ||
- reload openresty | ||
- "reload openresty" | ||
- "info alb component openresty" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,45 @@ | ||
# FILE: /opt/alb/bin/tests/test_alb-standard-node.py | ||
|
||
def test_haproxy_is_installed(host): | ||
assert host.package("haproxy").is_installed | ||
def test_required_haproxy_is_installed(host): | ||
assert (not host.file("/opt/alb/info/haproxy").exists) \ | ||
or host.package("haproxy").is_installed | ||
|
||
|
||
def test_haproxy_is_enabled(host): | ||
assert host.service("haproxy").is_enabled | ||
def test_required_haproxy_is_enabled(host): | ||
assert (not host.file("/opt/alb/info/haproxy").exists) \ | ||
or host.service("haproxy").is_enabled | ||
|
||
|
||
def test_haproxy_is_running(host): | ||
assert host.service("haproxy").is_running | ||
def test_required_haproxy_is_running(host): | ||
assert (not host.file("/opt/alb/info/haproxy").exists) \ | ||
or host.service("haproxy").is_running | ||
|
||
|
||
def test_openresty_is_installed(host): | ||
assert host.package("openresty").is_installed | ||
def test_required_openresty_is_installed(host): | ||
assert (not host.file("/opt/alb/info/openresty").exists) \ | ||
or host.package("openresty").is_installed | ||
|
||
|
||
def test_openresty_is_enabled(host): | ||
assert host.service("openresty").is_enabled | ||
def test_required_openresty_is_enabled(host): | ||
assert (not host.file("/opt/alb/info/openresty").exists) \ | ||
or host.service("openresty").is_enabled | ||
|
||
|
||
def test_openresty_is_running(host): | ||
assert host.service("openresty").is_running | ||
def test_required_openresty_is_running(host): | ||
assert (not host.file("/opt/alb/info/openresty").exists) \ | ||
or host.service("openresty").is_running | ||
|
||
|
||
def test_ufw_is_installed(host): | ||
assert host.package("ufw").is_installed | ||
def test_required_ufw_is_installed(host): | ||
assert (not host.file("/opt/alb/info/ufw").exists) \ | ||
or host.package("ufw").is_installed | ||
|
||
|
||
def test_ufw_is_enabled(host): | ||
assert host.service("ufw").is_enabled | ||
def test_required_ufw_is_enabled(host): | ||
assert (not host.file("/opt/alb/info/ufw").exists) \ | ||
or host.service("ufw").is_enabled | ||
|
||
|
||
def test_ufw_is_running(host): | ||
assert host.service("ufw").is_running | ||
def test_required_ufw_is_running(host): | ||
assert (not host.file("/opt/alb/info/ufw").exists) \ | ||
or host.service("ufw").is_running |