-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coverage for autoprovision and reboot of discovered host (#12815)
* Coverage for autoprovision and reboot of discovered host * Added one more test case for autoprovision of multiple discoveredhosts * Making a discovery component helper module
- Loading branch information
1 parent
a1dade8
commit ff06a9d
Showing
3 changed files
with
89 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from fauxfactory import gen_string | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def module_discovery_hostgroup(module_org, module_location, module_target_sat): | ||
host = module_target_sat.api.Host(organization=module_org, location=module_location).create() | ||
return module_target_sat.api.HostGroup( | ||
organization=[module_org], | ||
location=[module_location], | ||
medium=host.medium, | ||
root_pass=gen_string('alpha'), | ||
operatingsystem=host.operatingsystem, | ||
ptable=host.ptable, | ||
domain=host.domain, | ||
architecture=host.architecture, | ||
).create() | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def discovery_org(module_org, module_target_sat): | ||
discovery_org = module_target_sat.update_setting('discovery_organization', module_org.name) | ||
yield module_org | ||
module_target_sat.update_setting('discovery_organization', discovery_org) | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def discovery_location(module_location, module_target_sat): | ||
discovery_loc = module_target_sat.update_setting('discovery_location', module_location.name) | ||
yield module_location | ||
module_target_sat.update_setting('discovery_location', discovery_loc) |
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