Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kr-santosh committed Jan 16, 2023
1 parent 80ce3e4 commit 1a44a9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static async Task<ClientEncryptionKeyResponse> CreateClientEncryptionKeyA

if (keyVaultUriSegments.Length != 4 || !string.Equals(keyVaultUriSegments[1], "keys/", StringComparison.InvariantCultureIgnoreCase))
{
throw new ArgumentException($"Invalid key vault uri'{encryptionKeyWrapMetadata.Value}' passed. Pass the complete Azure keyvault key identifier. Please refer to https://aka.ms/CosmosClientEncryption for more details.");
throw new ArgumentException($"Invalid Key Vault URI'{encryptionKeyWrapMetadata.Value}' passed. Pass the complete Azure keyvault key identifier. Please refer to https://aka.ms/CosmosClientEncryption for more details.");
}
}

Expand Down Expand Up @@ -210,7 +210,7 @@ public static async Task<ClientEncryptionKeyResponse> RewrapClientEncryptionKeyA

if (keyVaultUriSegments.Length != 4 || !string.Equals(keyVaultUriSegments[1], "keys/", StringComparison.InvariantCultureIgnoreCase))
{
throw new ArgumentException($"Invalid key vault uri'{newEncryptionKeyWrapMetadata.Value}' passed. Pass the complete Azure keyvault key identifier. Please refer to https://aka.ms/CosmosClientEncryption for more details.");
throw new ArgumentException($"Invalid Key Vault URI'{newEncryptionKeyWrapMetadata.Value}' passed. Pass the complete Azure keyvault key identifier. Please refer to https://aka.ms/CosmosClientEncryption for more details.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ await MdeEncryptionTests.CreateClientEncryptionKeyAsync(
}
catch(Exception ex)
{
Assert.AreEqual(true, ex.Message.Contains("Invalid key vault uri"));
Assert.AreEqual(true, ex.Message.Contains("Invalid Key Vault URI"));
}

// rewrap old key with new key vault uri without complete key identifier
Expand All @@ -355,7 +355,7 @@ await MdeEncryptionTests.CreateClientEncryptionKeyAsync(
}
catch (Exception ex)
{
Assert.AreEqual(true, ex.Message.Contains("Invalid key vault uri"));
Assert.AreEqual(true, ex.Message.Contains("Invalid Key Vault URI"));
}

encryptionCosmosClient.Dispose();
Expand Down

0 comments on commit 1a44a9c

Please sign in to comment.