-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic Foreman tests to replace fb-test-foreman.bats
Additionally replaces fb-test-katello.bats
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import pytest | ||
|
||
from urllib.parse import urlparse | ||
|
||
|
||
def test_foreman_version(api, variables): | ||
if 'foreman_version' not in variables: | ||
pytest.skip("'foreman_version' is not set") | ||
|
||
status = api.resource('home').call('status') | ||
|
||
assert status['version'] == variables['foreman_version'] | ||
|
||
|
||
def test_ping(api): | ||
ping = api.resource('ping').call('ping')['results'] | ||
|
||
assert ping['foreman']['database']['active'] | ||
|
||
if 'katello' in ping: | ||
assert ping['katello']['status'] == 'ok' | ||
|
||
|
||
def test_check_smart_proxy_registered(api, base_url): | ||
hostname = urlparse(base_url).hostname | ||
assert api.resource('smart_proxies').call('show', {'id': hostname}) |
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,4 +1,5 @@ | ||
{ | ||
"foreman_version": "2.4.0-develop", | ||
"username": "admin", | ||
"password": "changeme", | ||
"clients": [ | ||
|