Beispiel #1
0
 def test_strategy(self):
     self.useFixture(fixtures.EnvironmentVariable(
                     'MARATHON_APP_ID',
                     newvalue='/new_id/openstack/tg/tr'))
     self.useFixture(fixtures.EnvironmentVariable(
                     'KOLLA_CONFIG_STRATEGY',
                     newvalue=self.strategy))
     start.set_globals()
     self.assertEqual(self.expect, start.COPY_ALWAYS)
Beispiel #2
0
 def setUp(self):
     super(CommandTest, self).setUp()
     self.client = fake_client.FakeClient()
     self.client.start()
     self.addCleanup(self.client.stop)
     self.addCleanup(self.client.close)
     self.useFixture(fixtures.EnvironmentVariable(
                     'MARATHON_APP_ID',
                     newvalue='/t1/testg/testr'))
     start.set_globals()
Beispiel #3
0
 def setUp(self):
     super(CommandTest, self).setUp()
     self.client = fake_client.FakeClient()
     self.client.start()
     self.addCleanup(self.client.stop)
     self.addCleanup(self.client.close)
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_GROUP',
                                                  newvalue='testg'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_ROLE',
                                                  newvalue='testr'))
     start.set_globals()
Beispiel #4
0
 def setUp(self):
     super(RenderNovaConfTest, self).setUp()
     self.client = fake_client.FakeClient()
     self.client.start()
     self.addCleanup(self.client.stop)
     self.addCleanup(self.client.close)
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_PRIVATE_INTERFACE',
                                                  newvalue='eth1'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_PUBLIC_INTERFACE',
                                                  newvalue='eth2'))
     self.useFixture(fixtures.EnvironmentVariable(
                     'MARATHON_APP_ID',
                     newvalue='/did/openstack/nova/nova-compute'))
     start.set_globals()
Beispiel #5
0
 def setUp(self):
     super(TemplateFunctionTest, self).setUp()
     self.client = fake_client.FakeClient()
     self.client.start()
     self.addCleanup(self.client.stop)
     self.addCleanup(self.client.close)
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_PRIVATE_INTERFACE',
                                                  newvalue='eth1'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_PUBLIC_INTERFACE',
                                                  newvalue='eth2'))
     self.useFixture(fixtures.EnvironmentVariable(
                     'MARATHON_APP_ID',
                     newvalue='/deploy_id/testg/testr'))
     start.set_globals()
Beispiel #6
0
 def setUp(self):
     super(HostvarsAndGroupsTest, self).setUp()
     self.client = fake_client.FakeClient()
     self.client.start()
     self.addCleanup(self.client.stop)
     self.addCleanup(self.client.close)
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_DEPLOYMENT_ID',
                                                  newvalue='deploy_id'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_PRIVATE_INTERFACE',
                                                  newvalue='eth1'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_PUBLIC_INTERFACE',
                                                  newvalue='eth2'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_GROUP',
                                                  newvalue='testg'))
     self.useFixture(fixtures.EnvironmentVariable('KOLLA_ROLE',
                                                  newvalue='testr'))
     start.set_globals()
Beispiel #7
0
 def test_globals(self):
     start.set_globals()
     self.assertEqual(self.dep_id, start.DEPLOYMENT_ID)
     self.assertEqual(self.dep, start.DEPLOYMENT)
     self.assertEqual(self.role, start.ROLE)
     self.assertEqual(self.sn, start.SERVICE_NAME)