Exemplo n.º 1
0
 def setUp(self):
   super(SqlToken, self).setUp()
   CONF(config_files=[test.etcdir('keystone.conf'),
                      test.testsdir('test_overrides.conf'),
                      test.testsdir('backend_sql.conf')])
   sql_util.setup_test_database()
   self.token_api = token_sql.Token()
Exemplo n.º 2
0
 def setUp(self):
     super(SqlToken, self).setUp()
     CONF(config_files=[test.etcdir('keystone.conf'),
                        test.testsdir('test_overrides.conf'),
                        test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
     self.token_api = token_sql.Token()
 def config(self, config_files):
     super(KcMasterSqlTestCase, self).config([
         test.etcdir('keystone.conf.sample'),
         test.testsdir('test_overrides.conf'),
         test.testsdir('backend_sql.conf')
     ])
     sql_util.setup_test_database()
 def setUp(self):
     super(ImportLegacy, self).setUp()
     CONF(config_files=[test.etcdir('keystone.conf'),
                        test.testsdir('test_overrides.conf'),
                        test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
     self.identity_api = identity_sql.Identity()
Exemplo n.º 5
0
 def config(self, config_files):
     super(KcMasterSqlTestCase, self).config([
         test.etcdir('keystone.conf.sample'),
         test.testsdir('test_overrides.conf'),
         test.testsdir('backend_sql.conf'),
         test.testsdir('backend_sql_disk.conf')])
     sql_util.setup_test_database()
Exemplo n.º 6
0
 def setUp(self):
     super(MigrateNovaAuth, self).setUp()
     CONF(config_files=[test.etcdir('keystone.conf'),
                        test.testsdir('test_overrides.conf'),
                        test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
     self.identity_api = identity_sql.Identity()
     self.ec2_api = ec2_sql.Ec2()
Exemplo n.º 7
0
 def setUp(self):
     super(MigrateNovaAuth, self).setUp()
     self.config([test.etcdir('keystone.conf.sample'),
                  test.testsdir('test_overrides.conf'),
                  test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
     self.identity_api = identity_sql.Identity()
     self.ec2_api = ec2_sql.Ec2()
Exemplo n.º 8
0
 def setUp(self):
     super(SqlIdentity, self).setUp()
     CONF(config_files=[test.etcdir('keystone.conf'),
                        test.testsdir('test_overrides.conf'),
                        test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
     self.identity_api = identity_sql.Identity()
     self.load_fixtures(default_fixtures)
Exemplo n.º 9
0
 def setUp(self):
   super(SqlIdentity, self).setUp()
   CONF(config_files=[test.etcdir('keystone.conf'),
                      test.testsdir('test_overrides.conf'),
                      test.testsdir('backend_sql.conf')])
   sql_util.setup_test_database()
   self.identity_api = identity_sql.Identity()
   self.load_fixtures(default_fixtures)
Exemplo n.º 10
0
 def setUp(self):
     super(ImportLegacy, self).setUp()
     self.config([test.etcdir('keystone.conf.sample'),
                  test.testsdir('test_overrides.conf'),
                  test.testsdir('backend_sql.conf'),
                  test.testsdir('backend_sql_disk.conf')])
     sql_util.setup_test_database()
     self.identity_man = identity.Manager()
     self.identity_api = identity_sql.Identity()
Exemplo n.º 11
0
 def setUp(self):
     super(SqlCatalog, self).setUp()
     self.config([test.etcdir('keystone.conf.sample'),
                  test.testsdir('test_overrides.conf'),
                  test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
     self.catalog_api = catalog_sql.Catalog()
     self.catalog_man = catalog.Manager()
     self.load_fixtures(default_fixtures)
Exemplo n.º 12
0
 def setUp(self):
     super(ImportLegacy, self).setUp()
     self.config([
         test.etcdir('keystone.conf.sample'),
         test.testsdir('test_overrides.conf'),
         test.testsdir('backend_sql.conf')
     ])
     sql_util.setup_test_database()
     self.identity_api = identity_sql.Identity()
 def config(self):
     CONF(
         config_files=[
             test.etcdir("keystone.conf"),
             test.testsdir("test_overrides.conf"),
             test.testsdir("backend_sql.conf"),
         ]
     )
     sql_util.setup_test_database()
Exemplo n.º 14
0
 def setUp(self):
     self.config([
         test.etcdir('keystone.conf.sample'),
         test.testsdir('test_overrides.conf'),
         test.testsdir('backend_sql.conf'),
         test.testsdir('backend_sql_disk.conf')])
     sql_util.setup_test_database()
     self.load_backends()
     self.public_server = self.serveapp('keystone', name='main')
     self.admin_server = self.serveapp('keystone', name='admin')
Exemplo n.º 15
0
 def setUp(self):
     super(MigrateNovaAuth, self).setUp()
     self.config([test.etcdir('keystone.conf.sample'),
                  test.testsdir('test_overrides.conf'),
                  test.testsdir('backend_sql.conf'),
                  test.testsdir('backend_sql_disk.conf')])
     sql_util.setup_test_database()
     self.identity_man = identity.Manager()
     self.identity_api = identity_sql.Identity()
     self.ec2_api = ec2_sql.Ec2()
Exemplo n.º 16
0
 def setUp(self):
     super(SqlCatalog, self).setUp()
     self.config([
         test.etcdir('keystone.conf.sample'),
         test.testsdir('test_overrides.conf'),
         test.testsdir('backend_sql.conf')
     ])
     sql_util.setup_test_database()
     self.catalog_api = catalog_sql.Catalog()
     self.catalog_man = catalog.Manager()
     self.load_fixtures(default_fixtures)
Exemplo n.º 17
0
 def setUp(self):
     self.config([
         test.etcdir('keystone.conf.sample'),
         test.testsdir('test_overrides.conf'),
         test.testsdir('backend_sql.conf'),
         test.testsdir('backend_sql_disk.conf')
     ])
     sql_util.setup_test_database()
     self.load_backends()
     self.public_server = self.serveapp('keystone', name='main')
     self.admin_server = self.serveapp('keystone', name='admin')
Exemplo n.º 18
0
 def setUp(self):
     super(ImportLegacy, self).setUp()
     self.config(
         [
             test.etcdir("keystone.conf.sample"),
             test.testsdir("test_overrides.conf"),
             test.testsdir("backend_sql.conf"),
         ]
     )
     sql_util.setup_test_database()
     self.identity_api = identity_sql.Identity()
Exemplo n.º 19
0
 def setUp(self):
     self.config(
         [
             test.etcdir("keystone.conf.sample"),
             test.testsdir("test_overrides.conf"),
             test.testsdir("backend_sql.conf"),
             test.testsdir("backend_sql_disk.conf"),
         ]
     )
     sql_util.setup_test_database()
     self.load_backends()
     self.public_server = self.serveapp("keystone", name="main")
     self.admin_server = self.serveapp("keystone", name="admin")
Exemplo n.º 20
0
    def setUp(self, load_sample_data=True):
        """Setup for v3 Restful Test Cases.

        If a child class wants to create their own sample data
        and provide their own auth data to obtain tokens, then
        load_sample_data should be set to false.

        """
        self.config(
            [
                test.etcdir("keystone.conf.sample"),
                test.testsdir("test_overrides.conf"),
                test.testsdir("backend_sql.conf"),
                test.testsdir("backend_sql_disk.conf"),
            ]
        )

        sql_util.setup_test_database()
        self.load_backends()

        if load_sample_data:
            self.domain_id = uuid.uuid4().hex
            self.domain = self.new_domain_ref()
            self.domain["id"] = self.domain_id
            self.identity_api.create_domain(self.domain_id, self.domain)

            self.project_id = uuid.uuid4().hex
            self.project = self.new_project_ref(domain_id=self.domain_id)
            self.project["id"] = self.project_id
            self.identity_api.create_project(self.project_id, self.project)

            self.user_id = uuid.uuid4().hex
            self.user = self.new_user_ref(domain_id=self.domain_id, project_id=self.project_id)
            self.user["id"] = self.user_id
            self.identity_api.create_user(self.user_id, self.user)

            # create & grant policy.json's default role for admin_required
            self.role_id = uuid.uuid4().hex
            self.role = self.new_role_ref()
            self.role["id"] = self.role_id
            self.role["name"] = "admin"
            self.identity_api.create_role(self.role_id, self.role)
            self.identity_api.add_role_to_user_and_project(self.user_id, self.project_id, self.role_id)

        self.public_server = self.serveapp("keystone", name="main")
        self.admin_server = self.serveapp("keystone", name="admin")
Exemplo n.º 21
0
    def setUp(self):
        rules.reset()

        self.config([
            test.etcdir('keystone.conf.sample'),
            test.testsdir('test_overrides.conf'),
            test.testsdir('backend_sql.conf'),
            test.testsdir('backend_sql_disk.conf')])

        sql_util.setup_test_database()
        self.load_backends()

        self.domain_id = uuid.uuid4().hex
        self.domain = self.new_domain_ref()
        self.domain['id'] = self.domain_id
        self.identity_api.create_domain(self.domain_id, self.domain)

        self.project_id = uuid.uuid4().hex
        self.project = self.new_project_ref(
            domain_id=self.domain_id)
        self.project['id'] = self.project_id
        self.identity_api.create_project(self.project_id, self.project)

        self.user_id = uuid.uuid4().hex
        self.user = self.new_user_ref(
            domain_id=self.domain_id,
            project_id=self.project_id)
        self.user['id'] = self.user_id
        self.identity_api.create_user(self.user_id, self.user)

        # create & grant policy.json's default role for admin_required
        self.role_id = uuid.uuid4().hex
        self.role = self.new_role_ref()
        self.role['id'] = self.role_id
        self.role['name'] = 'admin'
        self.identity_api.create_role(self.role_id, self.role)
        self.identity_api.add_role_to_user_and_project(
            self.user_id, self.project_id, self.role_id)

        self.public_server = self.serveapp('keystone', name='main')
        self.admin_server = self.serveapp('keystone', name='admin')
Exemplo n.º 22
0
 def config(self):
     CONF(config_files=[test.etcdir('keystone.conf.sample'),
                        test.testsdir('test_overrides.conf'),
                        test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
 def config(self):
     CONF(config_files=[test.etcdir('keystone.conf'),
                        test.testsdir('test_overrides.conf'),
                        test.testsdir('backend_sql.conf')])
     sql_util.setup_test_database()
Exemplo n.º 24
0
    def setUp(self, load_sample_data=True):
        """Setup for v3 Restful Test Cases.

        If a child class wants to create their own sample data
        and provide their own auth data to obtain tokens, then
        load_sample_data should be set to false.

        """
        self.config([
            test.etcdir('keystone.conf.sample'),
            test.testsdir('test_overrides.conf'),
            test.testsdir('backend_sql.conf'),
            test.testsdir('backend_sql_disk.conf')])

        sql_util.setup_test_database()
        self.load_backends()

        if load_sample_data:
            self.domain_id = uuid.uuid4().hex
            self.domain = self.new_domain_ref()
            self.domain['id'] = self.domain_id
            self.identity_api.create_domain(self.domain_id, self.domain)

            self.project_id = uuid.uuid4().hex
            self.project = self.new_project_ref(
                domain_id=self.domain_id)
            self.project['id'] = self.project_id
            self.identity_api.create_project(self.project_id, self.project)

            self.user_id = uuid.uuid4().hex
            self.user = self.new_user_ref(
                domain_id=self.domain_id,
                project_id=self.project_id)
            self.user['id'] = self.user_id
            self.identity_api.create_user(self.user_id, self.user)

            self.default_domain_project_id = uuid.uuid4().hex
            self.default_domain_project = self.new_project_ref(
                domain_id=DEFAULT_DOMAIN_ID)
            self.default_domain_project['id'] = self.default_domain_project_id
            self.identity_api.create_project(self.default_domain_project_id,
                                             self.default_domain_project)

            self.default_domain_user_id = uuid.uuid4().hex
            self.default_domain_user = self.new_user_ref(
                domain_id=DEFAULT_DOMAIN_ID,
                project_id=self.default_domain_project_id)
            self.default_domain_user['id'] = self.default_domain_user_id
            self.identity_api.create_user(self.default_domain_user_id,
                                          self.default_domain_user)

            # create & grant policy.json's default role for admin_required
            self.role_id = uuid.uuid4().hex
            self.role = self.new_role_ref()
            self.role['id'] = self.role_id
            self.role['name'] = 'admin'
            self.identity_api.create_role(self.role_id, self.role)
            self.identity_api.add_role_to_user_and_project(
                self.user_id, self.project_id, self.role_id)
            self.identity_api.add_role_to_user_and_project(
                self.default_domain_user_id, self.default_domain_project_id,
                self.role_id)
            self.identity_api.add_role_to_user_and_project(
                self.default_domain_user_id, self.project_id,
                self.role_id)

        self.public_server = self.serveapp('keystone', name='main')
        self.admin_server = self.serveapp('keystone', name='admin')
Exemplo n.º 25
0
    def setUp(self, load_sample_data=True):
        """Setup for v3 Restful Test Cases.

        If a child class wants to create their own sample data
        and provide their own auth data to obtain tokens, then
        load_sample_data should be set to false.

        """
        self.config([
            test.etcdir('keystone.conf.sample'),
            test.testsdir('test_overrides.conf'),
            test.testsdir('backend_sql.conf'),
            test.testsdir('backend_sql_disk.conf')])

        sql_util.setup_test_database()
        self.load_backends()

        self.public_app = webtest.TestApp(
            self.loadapp('keystone', name='main'))
        self.admin_app = webtest.TestApp(
            self.loadapp('keystone', name='admin'))

        if load_sample_data:
            self.domain_id = uuid.uuid4().hex
            self.domain = self.new_domain_ref()
            self.domain['id'] = self.domain_id
            self.identity_api.create_domain(self.domain_id, self.domain)

            self.project_id = uuid.uuid4().hex
            self.project = self.new_project_ref(
                domain_id=self.domain_id)
            self.project['id'] = self.project_id
            self.identity_api.create_project(self.project_id, self.project)

            self.user_id = uuid.uuid4().hex
            self.user = self.new_user_ref(
                domain_id=self.domain_id,
                project_id=self.project_id)
            self.user['id'] = self.user_id
            self.identity_api.create_user(self.user_id, self.user)

            self.default_domain_project_id = uuid.uuid4().hex
            self.default_domain_project = self.new_project_ref(
                domain_id=DEFAULT_DOMAIN_ID)
            self.default_domain_project['id'] = self.default_domain_project_id
            self.identity_api.create_project(self.default_domain_project_id,
                                             self.default_domain_project)

            self.default_domain_user_id = uuid.uuid4().hex
            self.default_domain_user = self.new_user_ref(
                domain_id=DEFAULT_DOMAIN_ID,
                project_id=self.default_domain_project_id)
            self.default_domain_user['id'] = self.default_domain_user_id
            self.identity_api.create_user(self.default_domain_user_id,
                                          self.default_domain_user)

            # create & grant policy.json's default role for admin_required
            self.role_id = uuid.uuid4().hex
            self.role = self.new_role_ref()
            self.role['id'] = self.role_id
            self.role['name'] = 'admin'
            self.identity_api.create_role(self.role_id, self.role)
            self.identity_api.add_role_to_user_and_project(
                self.user_id, self.project_id, self.role_id)
            self.identity_api.add_role_to_user_and_project(
                self.default_domain_user_id, self.default_domain_project_id,
                self.role_id)
            self.identity_api.add_role_to_user_and_project(
                self.default_domain_user_id, self.project_id,
                self.role_id)

        self.public_server = self.serveapp('keystone', name='main')
        self.admin_server = self.serveapp('keystone', name='admin')