diff --git a/README.rst b/README.rst index d7eb7a71..68b4406a 100644 --- a/README.rst +++ b/README.rst @@ -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. :: diff --git a/whitebox_tempest_plugin/api/compute/test_cpu_pinning.py b/whitebox_tempest_plugin/api/compute/test_cpu_pinning.py index 95776b96..beb376dd 100644 --- a/whitebox_tempest_plugin/api/compute/test_cpu_pinning.py +++ b/whitebox_tempest_plugin/api/compute/test_cpu_pinning.py @@ -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. diff --git a/whitebox_tempest_plugin/config.py b/whitebox_tempest_plugin/config.py index 56ca1192..57110e77 100644 --- a/whitebox_tempest_plugin/config.py +++ b/whitebox_tempest_plugin/config.py @@ -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."), ]