def test_deploy_states(self):
     self.run_params["vms"] = "vm1"
     self.args.vm_strs = {"vm1": "only CentOS\nstates=state1 state2\n"}
     DummyTestRunning.asserted_tests = [
         {"shortname": "^internal.permanent.customize_vm.vm1", "vms": "^vm1$", "get_state": "^state1$", "set_state": "^state1$"},
         {"shortname": "^internal.permanent.customize_vm.vm1", "vms": "^vm1$", "get_state": "^state2$", "set_state": "^state2$"},
     ]
     intertest_setup.deploy(self.args, self.run_params, tag="ut")
     self.assertEqual(len(DummyTestRunning.asserted_tests), 0, "Some tests weren't run: %s" % DummyTestRunning.asserted_tests)
Beispiel #2
0
 def test_deploy_states_multivm(self):
     self.config["vm_strs"] = {
         "vm1": "only CentOS\nstates=state1 state2 state3\n",
         "vm2": "only Win10\nstates=state1 state3\n"
     }
     DummyTestRunning.asserted_tests = [
         {
             "shortname": "^internal.permanent.customize.vm1",
             "vms": "^vm1$",
             "get_state": "^state1$",
             "set_state": "^state1$"
         },
         {
             "shortname": "^internal.permanent.customize.vm1",
             "vms": "^vm1$",
             "get_state": "^state2$",
             "set_state": "^state2$"
         },
         {
             "shortname": "^internal.permanent.customize.vm1",
             "vms": "^vm1$",
             "get_state": "^state3$",
             "set_state": "^state3$"
         },
         {
             "shortname": "^internal.permanent.customize.vm2",
             "vms": "^vm2$",
             "get_state": "^state1$",
             "set_state": "^state1$"
         },
         {
             "shortname": "^internal.permanent.customize.vm2",
             "vms": "^vm2$",
             "get_state": "^state3$",
             "set_state": "^state3$"
         },
     ]
     intertest_setup.deploy(self.config, tag="ut")
     self.assertEqual(
         len(DummyTestRunning.asserted_tests), 0,
         "Some tests weren't run: %s" % DummyTestRunning.asserted_tests)