def parse_littlechef_config(wrapper, path=None): """ Parse littlechef "config.cfg" """ littlechef.CONFIGFILE = path or os.path.join(os.path.dirname(__file__), "config.cfg") runner._readconfig() wrapper.username = runner.env.user
def test_get_config(self): """Should read configuration from config file when config.cfg is found """ runner._readconfig() self.assertEqual(runner.env.ssh_config, None) self.assertEqual(runner.env.user, "testuser") self.assertEqual(runner.env.password, "testpass") self.assertEqual(runner.env.key_filename, None) self.assertEqual(runner.env.node_work_path, "/tmp/chef-solo")
def test_get_config(self): """Should read configuration from config file when config.cfg is found """ runner._readconfig() self.assertEqual(runner.env.ssh_config_path, None) self.assertEqual(runner.env.ssh_config, None) self.assertEqual(runner.env.user, "testuser") self.assertEqual(runner.env.password, "testpass") self.assertEqual(runner.env.key_filename, None) self.assertEqual(runner.env.node_work_path, "/tmp/chef-solo") self.assertEqual(runner.env.encrypted_data_bag_secret, None)
def test_get_config(self): """Should read configuration from config file when config.cfg is found """ runner._readconfig() self.assertEqual(runner.env.ssh_config_path, None) self.assertEqual(runner.env.ssh_config, None) self.assertEqual(runner.env.user, "testuser") self.assertEqual(runner.env.password, "testpass") self.assertEqual(runner.env.key_filename, None) self.assertEqual(runner.env.node_work_path, "/tmp/chef-solo") self.assertEqual(runner.env.encrypted_data_bag_secret, None) self.assertEqual(runner.env.sync_packages_dest_dir, "/srv/repos") self.assertEqual(runner.env.sync_packages_local_dir, "./repos")