def test_users_cannot_see_hive_databases_for_other_orgs(
            self, test_org, admin_user, add_admin_to_test_org, context):
        org1 = test_org
        user1 = admin_user
        step("Create second user and organization")
        user2, org2 = onboard(context)
        org1_database_name = escape_hive_name(org1.guid)
        user1_databases = self._get_hive_databases(user1)
        org2_database_name = escape_hive_name(org2.guid)
        user2_databases = self._get_hive_databases(user2)

        assert org1_database_name not in user2_databases, "User can see the other user's database"
        assert org2_database_name not in user1_databases, "User can see the other user's database"
Esempio n. 2
0
 def test_0_create_new_dataset_and_import_it_to_arcadia(
         self, test_org, dataset, arcadia):
     step("Publish created dataset")
     dataset.api_publish()
     step(
         "Check that organization guid is visible on the database list in arcadia"
     )
     expected_db_name = escape_hive_name(test_org.guid)
     db_list = arcadia.get_database_list()
     assert expected_db_name in db_list, "{} was not found in db list".format(
         expected_db_name)
     step("Check that dataset name is visible on the table list in arcadia")
     assertions.assert_in_with_retry(escape_hive_name(dataset.title),
                                     arcadia.get_table_list,
                                     expected_db_name)
     step("Create new dataset in arcadia")
     arcadia_dataset = arcadia.create_dataset(test_org.name, dataset.title)
     assertions.assert_in_with_retry(arcadia_dataset,
                                     arcadia.get_dataset_list)
    def test_1_check_database(self, test_org):
        """
        <b>Description:</b>
        Check that in hue there is a corresponding organization database.

        <b>Input data:</b>
        1. test organization

        <b>Expected results:</b>
        Test passes when there is a corresponding organization database in hue.

        <b>Steps:</b>
        1. Decode organization id to database name.
        2. Check if database name exists in hue database list.
        """
        step("Check organization database is on the list of hive databases")
        self.__class__.database_name = escape_hive_name(test_org.guid)
        response = hue.get_databases()
        assert self.database_name in response["databases"]
Esempio n. 4
0
 def test_7_hive_table_manipulation(self, test_org):
     step("Run atk table manipulation test")
     atk_test_script_path = os.path.join(ATKtools.TEST_SCRIPTS_DIRECTORY, "hive_table_manipulation_test.py")
     self.atk_virtualenv.run_atk_script(atk_test_script_path, self.atk_url,
                                        arguments={"--database-name": escape_hive_name(test_org.guid),
                                                   "--table-name": self.transfer_title})
 def test_user_can_see_org_hive_database(self, test_org, admin_user,
                                         add_admin_to_test_org):
     user_databases = self._get_hive_databases(admin_user)
     assert escape_hive_name(
         test_org.guid) in user_databases, "User cannot see their database"