def test_add_and_remove_config(self):
self.init_with_remote_catalog()
with self.captured_output() as (out, err):
StateHolder.skip_docker = True
poco = Poco(home_dir=self.tmpdir, argv=["catalog", "config", "add", "teszt", "ssh://teszt.teszt/teszt"])
poco.run()
self.assertEqual(0, len(err.getvalue()))
data = dict()
data["teszt"] = dict()
data["teszt"]["repositoryType"] = "git"
data["teszt"]["server"] = "ssh://teszt.teszt/teszt"
self.assertIn(yaml.dump(data, default_flow_style=False, default_style='', indent=4).strip(),
out.getvalue().strip())
self.clean_states()
with self.captured_output() as (out, err):
StateHolder.skip_docker = True
poco = Poco(home_dir=self.tmpdir, argv=["catalog", "config", "remove", "teszt"])
poco.run()
self.assertEqual(0, len(err.getvalue()))
self.assertNotIn("teszt", out.getvalue().strip())
评论列表
文章目录