Example #1
0
def bucket(s3_client: S3Client) -> str:  # pylint: disable=W0621
    bucket_name = "simcore-test"
    s3_client.create_bucket(bucket_name, delete_contents_if_exists=True)
    # set env variables
    os.environ["S3_BUCKET_NAME"] = bucket_name
    yield bucket_name

    s3_client.remove_bucket(bucket_name, delete_contents=True)
def bucket(minio_config: Dict[str, str], minio_service: S3Client) -> str:
    bucket_name = minio_config["bucket_name"]
    minio_service.create_bucket(bucket_name, delete_contents_if_exists=True)
    yield bucket_name

    minio_service.remove_bucket(bucket_name, delete_contents=True)