Add max_compute_nodes option
This option indicates the number of (available) compute hosts in the deployment, and will be used by tests that require all their instances landing on the same host (ie, a single-compute deployment). The default value is a childish large number to make sure that tests that need a single node are skipped unless max_compute_nodes is set. Change-Id: Id274baeb13ce87783e35daff74bf4cfe67554900
This commit is contained in:
parent
8d64aee671
commit
35542f79d3
@ -57,6 +57,8 @@ Install, configure and run
|
||||
# ctlplane_ssh_username = heat-admin
|
||||
# ctlplane_ssh_private_key_path = /home/stack/.ssh/id_rsa
|
||||
containers = true
|
||||
max_compute_nodes = 2 # Some tests depend on there being a single
|
||||
# (available) compute node
|
||||
|
||||
3. Execute the tests. ::
|
||||
|
||||
|
@ -80,6 +80,8 @@ class CPUPolicyTest(BaseTest):
|
||||
flavor = self.create_flavor(cpu_policy='shared')
|
||||
self.create_test_server(flavor=flavor['id'])
|
||||
|
||||
@testtools.skipUnless(CONF.whitebox.max_compute_nodes < 2,
|
||||
'Single compute node required.')
|
||||
def test_cpu_dedicated(self):
|
||||
"""Ensure an instance with 'dedicated' pinning policy work.
|
||||
|
||||
|
@ -52,4 +52,9 @@ opts = [
|
||||
"While this looks like a poor man's DNS, this is needed "
|
||||
"because the environment running the test does not necessarily "
|
||||
"have the ctlplane DNS accessible."),
|
||||
cfg.IntOpt(
|
||||
'max_compute_nodes',
|
||||
default=31337,
|
||||
help="Number of compute hosts in the deployment. Some tests depend "
|
||||
"on there being a single compute host."),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user