def tearDownClass(cls):
     cls.clear_directory()
     if not is_integration():
         directory_arn = Config.get_directory()._dir_arn
         schema_arn = get_published_schema_from_directory(directory_arn)
         cleanup_directory(directory_arn)
         cleanup_schema(f"{schema_arn}/0")
         if old_directory_name:
             os.environ["FUSILLADE_DIR"] = old_directory_name
Beispiel #2
0
 def tearDownClass(cls):
     cleanup_directory(cls.directory._dir_arn)
     cleanup_schema(cls.schema_arn)
Beispiel #3
0
if __name__ == "__main__":
    for response in cd_client.get_paginator('list_directories').paginate(
            MaxResults=30, state='ENABLED'):
        for directory in response['Directories']:
            if 'test_dir' in directory['Name']:
                cleanup_directory(directory['DirectoryArn'])

    directories = [
        i['Name'] for i in cd_client.list_directories(
            MaxResults=30, state='ENABLED')['Directories']
    ]
    print('DIRECTORIES:')
    for i in directories:
        print('\t', i)

    for response_0 in cd_client.get_paginator(
            'list_published_schema_arns').paginate(MaxResults=30):
        for schema_0 in response_0['SchemaArns']:
            if "authz/T" in schema_0:
                for response_1 in cd_client.get_paginator(
                        'list_published_schema_arns').paginate(
                            SchemaArn=schema_0, MaxResults=30):
                    for schema_1 in response_1['SchemaArns']:
                        cleanup_schema(schema_1)

    schemas = cd_client.list_published_schema_arns(MaxResults=30)['SchemaArns']
    print('Schemas:')
    for i in schemas:
        print('\t', i)