示例#1
0
    def setUp(self):
        super(_FunctionalTestBase, self).setUp()

        f = self._get_flags()
        self.flags(**f)
        self.flags(verbose=True)

        for var in ('http_proxy', 'HTTP_PROXY'):
            self.useFixture(fixtures.EnvironmentVariable(var))

        # set up services
        self.volume = self.start_service('volume')
        # NOTE(dulek): Mocking eventlet.sleep so test won't time out on
        # scheduler service start.
        with mock.patch('eventlet.sleep'):
            self.scheduler = self.start_service('scheduler')
        self._start_api_service()
        self.addCleanup(self.osapi.stop)

        self.api = client.TestOpenStackClient('fake', 'fake', self.auth_url)
    def setUp(self):
        super(_FunctionalTestBase, self).setUp()

        f = self._get_flags()
        for k, value_dict in f.items():
            self.override_config(k, value_dict['v'], value_dict.get('g'))

        for var in ('http_proxy', 'HTTP_PROXY'):
            self.useFixture(fixtures.EnvironmentVariable(var))

        # set up services
        self.volume = self.start_service('volume')
        # NOTE(dulek): Mocking eventlet.sleep so test won't time out on
        # scheduler service start.
        with mock.patch('eventlet.sleep'):
            self.scheduler = self.start_service('scheduler')
        self._start_api_service()
        self.addCleanup(self.osapi.stop)

        api_version = self.osapi_version_major + '.' + self.osapi_version_minor
        self.api = client.TestOpenStackClient(fake.USER_ID, fake.PROJECT_ID,
                                              self.auth_url, api_version)