diff --git a/src/Plugins/MinIO/StorageAdminService.cs b/src/Plugins/MinIO/StorageAdminService.cs index 341c38d..1a6c8ed 100644 --- a/src/Plugins/MinIO/StorageAdminService.cs +++ b/src/Plugins/MinIO/StorageAdminService.cs @@ -61,11 +61,6 @@ public StorageAdminService(IOptions options, ILogge _accessKey = options.Value.Settings[ConfigurationKeys.AccessKey]; _secretKey = options.Value.Settings[ConfigurationKeys.AccessToken]; - SetCommandTemplates(options); - } - - private void SetCommandTemplates(IOptions options) - { _set_connection_cmd = $"alias set {_serviceName} http://{_endpoint} {_accessKey} {_secretKey}"; _get_connections_cmd = "alias list"; _get_users_cmd = $"admin user list {_serviceName}"; @@ -105,7 +100,7 @@ public async Task SetPolicyAsync(IdentityType policyType, List pol var setPolicyCmd = string.Format(CultureInfo.InvariantCulture, _set_policy_cmd, _serviceName, policiesStr, policyType.ToString().ToLowerInvariant(), itemName); var result = await ExecuteAsync(setPolicyCmd).ConfigureAwait(false); - var expectedResult = $"Policy `{policiesStr}` is set on {policyType.ToString().ToLower()} `{itemName}`"; + var expectedResult = $"Attached Policies: [{policiesStr}]"; if (!result.Any(r => r.Contains(expectedResult))) { return false; @@ -274,7 +269,7 @@ private async Task CreatePolicyAsync(PolicyRequest[] policyRequests, str var policyFileName = await CreatePolicyFile(policyRequests, username).ConfigureAwait(false); var result = await ExecuteAsync(string.Format(CultureInfo.InvariantCulture, _create_policy_cmd, _serviceName, username, policyFileName)).ConfigureAwait(false); - if (result.Any(r => r.Contains($"Added policy `pol_{username}` successfully.")) is false) + if (result.Any(r => r.Contains($"Created policy `pol_{username}` successfully.")) is false) { await RemoveUserAsync(username).ConfigureAwait(false); File.Delete($"{username}.json"); diff --git a/src/Plugins/MinIO/Tests/Integration/mc b/src/Plugins/MinIO/Tests/Integration/mc index 1627ddc..7dbb8f9 100755 Binary files a/src/Plugins/MinIO/Tests/Integration/mc and b/src/Plugins/MinIO/Tests/Integration/mc differ diff --git a/src/Plugins/MinIO/Tests/Integration/mc.exe b/src/Plugins/MinIO/Tests/Integration/mc.exe index 33d00b5..c332c5f 100644 Binary files a/src/Plugins/MinIO/Tests/Integration/mc.exe and b/src/Plugins/MinIO/Tests/Integration/mc.exe differ