示例#1
0
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
示例#2
0
 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")
示例#3
0
 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)
示例#4
0
 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")