diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-25 15:17:38 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-25 15:17:38 -0400 |
commit | 80c166ab60c4608ac83afb865f76b4206d593818 (patch) | |
tree | e3c97725370f8cae1943b156fb281e9d055b89cf /utils/test | |
parent | e3071fd15f70214fe9f13b847f2cc5443716d955 (diff) | |
download | openshift-80c166ab60c4608ac83afb865f76b4206d593818.tar.gz openshift-80c166ab60c4608ac83afb865f76b4206d593818.tar.bz2 openshift-80c166ab60c4608ac83afb865f76b4206d593818.tar.xz openshift-80c166ab60c4608ac83afb865f76b4206d593818.zip |
Explicitly set schedulable when masters == nodes.
When the masters are the only nodes in play, we need to explicitly set
schedulable to True due to logic in openshift_facts.py which assumes that if
the node is also a master, schedulable should be false.
Diffstat (limited to 'utils/test')
-rw-r--r-- | utils/test/cli_installer_tests.py | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/utils/test/cli_installer_tests.py b/utils/test/cli_installer_tests.py index c951b6580..8e9c2d698 100644 --- a/utils/test/cli_installer_tests.py +++ b/utils/test/cli_installer_tests.py @@ -209,7 +209,6 @@ class OOCliFixture(OOInstallFixture): self.assertEquals(exp_hosts_to_run_on_len, len(hosts_to_run_on)) def _verify_config_hosts(self, written_config, host_count): - print written_config['hosts'] self.assertEquals(host_count, len(written_config['hosts'])) for h in written_config['hosts']: self.assertTrue('hostname' in h) @@ -712,7 +711,7 @@ class AttendedCliTests(OOCliFixture): inventory = ConfigParser.ConfigParser(allow_no_value=True) inventory.read(os.path.join(self.work_dir, '.ansible/hosts')) self.assertEquals('False', - inventory.get('nodes', '10.0.0.1 openshift_scheduleable')) + inventory.get('nodes', '10.0.0.1 openshift_schedulable')) self.assertEquals(None, inventory.get('nodes', '10.0.0.2')) self.assertEquals(None, @@ -744,7 +743,6 @@ class AttendedCliTests(OOCliFixture): result = self.runner.invoke(cli.cli, self.cli_args, input=cli_input) - print result self.assert_result(result, 0) self._verify_load_facts(load_facts_mock) @@ -830,15 +828,13 @@ class AttendedCliTests(OOCliFixture): inventory = ConfigParser.ConfigParser(allow_no_value=True) inventory.read(os.path.join(self.work_dir, '.ansible/hosts')) self.assertEquals('False', - inventory.get('nodes', '10.0.0.1 openshift_scheduleable')) + inventory.get('nodes', '10.0.0.1 openshift_schedulable')) self.assertEquals('False', - inventory.get('nodes', '10.0.0.2 openshift_scheduleable')) + inventory.get('nodes', '10.0.0.2 openshift_schedulable')) self.assertEquals(None, inventory.get('nodes', '10.0.0.3')) self.assertEquals('False', - inventory.get('nodes', '10.0.0.4 openshift_scheduleable')) - - return + inventory.get('nodes', '10.0.0.4 openshift_schedulable')) #interactive multimaster: equal number masters and nodes @patch('ooinstall.openshift_ansible.run_main_playbook') @@ -868,14 +864,12 @@ class AttendedCliTests(OOCliFixture): inventory = ConfigParser.ConfigParser(allow_no_value=True) inventory.read(os.path.join(self.work_dir, '.ansible/hosts')) - self.assertEquals(None, - inventory.get('nodes', '10.0.0.1')) - self.assertEquals(None, - inventory.get('nodes', '10.0.0.2')) - self.assertEquals(None, - inventory.get('nodes', '10.0.0.3')) - - return + self.assertEquals('True', + inventory.get('nodes', '10.0.0.1 openshift_schedulable')) + self.assertEquals('True', + inventory.get('nodes', '10.0.0.2 openshift_schedulable')) + self.assertEquals('True', + inventory.get('nodes', '10.0.0.3 openshift_schedulable')) #interactive all-in-one @patch('ooinstall.openshift_ansible.run_main_playbook') @@ -902,10 +896,8 @@ class AttendedCliTests(OOCliFixture): inventory = ConfigParser.ConfigParser(allow_no_value=True) inventory.read(os.path.join(self.work_dir, '.ansible/hosts')) - self.assertEquals(None, - inventory.get('nodes', '10.0.0.1')) - - return + self.assertEquals('True', + inventory.get('nodes', '10.0.0.1 openshift_schedulable')) # TODO: test with config file, attended add node # TODO: test with config file, attended new node already in config file |