Пример #1
0
def clean_minio():
    if not MINIO.bucket_exists(S3_BUCKET):
        MINIO.make_bucket(S3_BUCKET)

    # Make sure to delete extra objects in the remote Minio bucket
    _cleanup_minio()
    yield MINIO
    # Comment this out if tests fail and you want to see what the hell went on in the bucket.
    _cleanup_minio()
Пример #2
0
def clean_minio():
    try:
        MINIO.make_bucket(S3_BUCKET)
    except BucketAlreadyExists:
        pass
    except BucketAlreadyOwnedByYou:
        pass

    # Make sure to delete extra objects in the remote Minio bucket
    _cleanup_minio()
    yield MINIO
    # Comment this out if tests fail and you want to see what the hell went on in the bucket.
    _cleanup_minio()