Example #1
0
 def setUp(self):
     super(TestDBCommands, self).setUp()
     self.conf = cfg.ConfigOpts()
     conf_fixture = config_fixture.Config(self.conf)
     self.useFixture(conf_fixture)
     conf.register_opts(conf_fixture.conf)
     conf_fixture.config(group="placement_database", connection='sqlite://')
     command_opts = manage.setup_commands(conf_fixture)
     conf_fixture.register_cli_opts(command_opts)
     self.output = self.useFixture(
         output.CaptureOutput(do_stderr=True, do_stdout=True))
Example #2
0
 def setUp(self):
     super(TestCommandParsers, self).setUp()
     self.conf = cfg.ConfigOpts()
     conf_fixture = config_fixture.Config(self.conf)
     self.useFixture(conf_fixture)
     conf.register_opts(conf_fixture.conf)
     # Quiet output from argparse (used within oslo_config).
     # If you are debugging, commenting this out might be useful.
     self.output = self.useFixture(
         output.CaptureOutput(do_stderr=True, do_stdout=True))
     # We don't use a database, but we need to set the opt as
     # it's required for a valid config.
     conf_fixture.config(group="placement_database", connection='sqlite://')
     command_opts = manage.setup_commands(conf_fixture)
     # Command line opts must be registered on the conf_fixture, otherwise
     # they carry over globally.
     conf_fixture.register_cli_opts(command_opts)