@patch('ooinstall.openshift_ansible.run_main_playbook')
    @patch('ooinstall.openshift_ansible.load_system_facts')
    def test_cfg_full_run(self, load_facts_mock, run_playbook_mock):
        load_facts_mock.return_value = (MOCK_FACTS, 0)
        run_playbook_mock.return_value = 0

        config_file = self.write_config(os.path.join(self.work_dir,
            'ooinstall.conf'), SAMPLE_CONFIG % 'openshift-enterprise')

        self.cli_args.extend(["-c", config_file, "install"])
        result = self.runner.invoke(cli.cli, self.cli_args)
        self.assert_result(result, 0)

        load_facts_args = load_facts_mock.call_args[0]
        self.assertEquals(os.path.join(self.work_dir, "hosts"),
            load_facts_args[0])
        self.assertEquals(os.path.join(self.work_dir,
            "playbooks/byo/openshift_facts.yml"), load_facts_args[1])
        env_vars = load_facts_args[2]
        self.assertEquals(os.path.join(self.work_dir,
            '.ansible/callback_facts.yaml'),
            env_vars['OO_INSTALL_CALLBACK_FACTS_YAML'])
        self.assertEqual('/tmp/ansible.log', env_vars['ANSIBLE_LOG_PATH'])
        # If user running test has rpm installed, this might be set to default:
        self.assertTrue('ANSIBLE_CONFIG' not in env_vars or
            env_vars['ANSIBLE_CONFIG'] == cli.DEFAULT_ANSIBLE_CONFIG)

        # Make sure we ran on the expected masters and nodes:
        hosts = run_playbook_mock.call_args[0][1]
        hosts_to_run_on = run_playbook_mock.call_args[0][2]
        self.assertEquals(3, len(hosts))
        self.assertEquals(3, len(hosts_to_run_on))
dataset/ETHPy150Open openshift/openshift-ansible/utils/test/cli_installer_tests.py/UnattendedCliTests.test_cfg_full_run/original