|
|
@ -592,8 +592,10 @@ public static class FunctionalTest |
|
|
|
ObjectLockConfiguration lockConfig = null; |
|
|
|
try |
|
|
|
{ |
|
|
|
var versioningConfig = await minio.GetVersioningAsync(new GetVersioningArgs() |
|
|
|
.WithBucket(bucketName)).ConfigureAwait(false); |
|
|
|
VersioningConfiguration versioningConfig = null; |
|
|
|
versioningConfig = await minio.GetVersioningAsync(new GetVersioningArgs() |
|
|
|
.WithBucket(bucketName) |
|
|
|
.WithVersions(true)).ConfigureAwait(false); |
|
|
|
if (versioningConfig is not null && |
|
|
|
(versioningConfig.Status.Contains("Enabled", StringComparison.Ordinal) || |
|
|
|
versioningConfig.Status.Contains("Suspended", StringComparison.Ordinal))) |
|
|
@ -2216,18 +2218,18 @@ public static class FunctionalTest |
|
|
|
} |
|
|
|
catch (NotImplementedException ex) |
|
|
|
{ |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
new MintLogger(nameof(ObjectLockConfigurationAsync_Test1), setObjectLockConfigurationSignature, |
|
|
|
"Tests whether SetObjectLockConfigurationAsync passes", TestStatus.NA, DateTime.Now - startTime, |
|
|
|
ex.Message, ex.ToString(), args: args).Log(); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
return; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
new MintLogger(nameof(ObjectLockConfigurationAsync_Test1), setObjectLockConfigurationSignature, |
|
|
|
"Tests whether SetObjectLockConfigurationAsync passes", TestStatus.FAIL, DateTime.Now - startTime, |
|
|
|
ex.Message, ex.ToString(), args: args).Log(); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
throw; |
|
|
|
} |
|
|
|
|
|
|
@ -2246,16 +2248,17 @@ public static class FunctionalTest |
|
|
|
catch (NotImplementedException ex) |
|
|
|
{ |
|
|
|
setLockNotImplemented = true; |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
new MintLogger(nameof(ObjectLockConfigurationAsync_Test1), setObjectLockConfigurationSignature, |
|
|
|
"Tests whether SetObjectLockConfigurationAsync passes", TestStatus.NA, DateTime.Now - startTime, |
|
|
|
ex.Message, ex.ToString(), args: args).Log(); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
new MintLogger(nameof(ObjectLockConfigurationAsync_Test1), setObjectLockConfigurationSignature, |
|
|
|
"Tests whether SetObjectLockConfigurationAsync passes", TestStatus.FAIL, DateTime.Now - startTime, |
|
|
|
ex.Message, ex.ToString(), args: args).Log(); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
throw; |
|
|
|
} |
|
|
|
|
|
|
@ -2276,6 +2279,7 @@ public static class FunctionalTest |
|
|
|
} |
|
|
|
catch (NotImplementedException ex) |
|
|
|
{ |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
getLockNotImplemented = true; |
|
|
|
new MintLogger(nameof(ObjectLockConfigurationAsync_Test1), getObjectLockConfigurationSignature, |
|
|
|
"Tests whether GetObjectLockConfigurationAsync passes", TestStatus.NA, DateTime.Now - startTime, |
|
|
@ -2329,7 +2333,6 @@ public static class FunctionalTest |
|
|
|
} |
|
|
|
finally |
|
|
|
{ |
|
|
|
await Task.Delay(1500).ConfigureAwait(false); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
@ -2734,7 +2737,6 @@ public static class FunctionalTest |
|
|
|
listenBucketNotificationsSignature, |
|
|
|
"Tests whether ListenBucketNotifications passes for small object", |
|
|
|
TestStatus.PASS, DateTime.Now - startTime, args: args).Log(); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
} |
|
|
|
catch (NotImplementedException ex) |
|
|
|
{ |
|
|
@ -2743,7 +2745,6 @@ public static class FunctionalTest |
|
|
|
"Tests whether ListenBucketNotifications passes for small object", |
|
|
|
TestStatus.NA, DateTime.Now - startTime, ex.Message, |
|
|
|
ex.ToString(), args: args).Log(); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
@ -2775,10 +2776,13 @@ public static class FunctionalTest |
|
|
|
"Tests whether ListenBucketNotifications passes for small object", |
|
|
|
TestStatus.FAIL, DateTime.Now - startTime, ex.Message, |
|
|
|
ex.ToString(), args: args).Log(); |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
throw; |
|
|
|
} |
|
|
|
} |
|
|
|
finally |
|
|
|
{ |
|
|
|
await TearDown(minio, bucketName).ConfigureAwait(false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal static async Task ListenBucketNotificationsAsync_Test2(IMinioClient minio) |
|
|
|