We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 965eb8c commit 60b3b87Copy full SHA for 60b3b87
tests/Get-AuthorizationHeader.Tests.ps1
@@ -30,7 +30,7 @@ InModuleScope cosmos-db {
30
It "Returns the correct signature hashed with the master key" {
31
$result = Get-AuthorizationHeader -ResourceGroup $MOCK_RG -SubscriptionId $MOCK_SUB -Database $MOCK_DB -Verb $MOCK_VERB -ResourceType $MOCK_RESOURCE_TYPE -ResourceUrl $MOCK_RESOURCE_URL -Now $MOCK_NOW
32
33
- $expectedSignature = "$MOCK_VERB`n$MOCK_RESOURCE_TYPE`n$MOCK_RESOURCE_URL`n$MOCK_NOW`n`n".ToLower()
+ $expectedSignature = "$($MOCK_VERB.ToLower())`n$($MOCK_RESOURCE_TYPE.ToLower())`n$MOCK_RESOURCE_URL`n$($MOCK_NOW.ToLower())`n`n"
34
35
$hasher = New-Object System.Security.Cryptography.HMACSHA256 -Property @{ Key = $MOCK_MASTER_KEY_BYTES }
36
$sigBinary=[System.Text.Encoding]::UTF8.GetBytes($expectedSignature)
0 commit comments