Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_batch_certificate - fix thumbprint casing in tests #3977

Merged
merged 10 commits into from
Aug 4, 2019
16 changes: 8 additions & 8 deletions azurerm/resource_arm_batch_certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestAccAzureRMBatchCertificate_Pfx(t *testing.T) {
location := testLocation()

subscriptionID := os.Getenv("ARM_SUBSCRIPTION_ID")
certificateID := fmt.Sprintf("/subscriptions/%s/resourceGroups/testaccbatch%d/providers/Microsoft.Batch/batchAccounts/testaccbatch%s/certificates/SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA", subscriptionID, ri, rs)
certificateID := fmt.Sprintf("/subscriptions/%s/resourceGroups/testaccbatch%d/providers/Microsoft.Batch/batchAccounts/testaccbatch%s/certificates/sha1-42c107874fd0e4a9583292a2f1098e8fe4b2edda", subscriptionID, ri, rs)

config := testAccAzureRMBatchCertificatePfx(ri, rs, location)

Expand All @@ -34,7 +34,7 @@ func TestAccAzureRMBatchCertificate_Pfx(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "id", certificateID),
resource.TestCheckResourceAttr(resourceName, "format", "Pfx"),
resource.TestCheckResourceAttr(resourceName, "thumbprint", "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"),
resource.TestCheckResourceAttr(resourceName, "thumbprint", "42c107874fd0e4a9583292a2f1098e8fe4b2edda"),
resource.TestCheckResourceAttr(resourceName, "thumbprint_algorithm", "SHA1"),
),
},
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestAccAzureRMBatchCertificate_Cer(t *testing.T) {
location := testLocation()

subscriptionID := os.Getenv("ARM_SUBSCRIPTION_ID")
certificateID := fmt.Sprintf("/subscriptions/%s/resourceGroups/testaccbatch%d/providers/Microsoft.Batch/batchAccounts/testaccbatch%s/certificates/SHA1-312D31A79FA0CEF49C00F769AFC2B73E9F4EDF34", subscriptionID, ri, rs)
certificateID := fmt.Sprintf("/subscriptions/%s/resourceGroups/testaccbatch%d/providers/Microsoft.Batch/batchAccounts/testaccbatch%s/certificates/sha1-312d31a79fa0cef49c00f769afc2b73e9f4edf34", subscriptionID, ri, rs)

config := testAccAzureRMBatchCertificateCer(ri, rs, location)

Expand All @@ -84,7 +84,7 @@ func TestAccAzureRMBatchCertificate_Cer(t *testing.T) {

resource.TestCheckResourceAttr(resourceName, "id", certificateID),
resource.TestCheckResourceAttr(resourceName, "format", "Cer"),
resource.TestCheckResourceAttr(resourceName, "thumbprint", "312D31A79FA0CEF49C00F769AFC2B73E9F4EDF34"),
resource.TestCheckResourceAttr(resourceName, "thumbprint", "312d31a79fa0cef49c00f769afc2b73e9f4edf34"),
resource.TestCheckResourceAttr(resourceName, "thumbprint_algorithm", "SHA1"),
),
},
Expand Down Expand Up @@ -132,7 +132,7 @@ resource "azurerm_batch_certificate" "test" {
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
password = "terraform"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint = "42c107874fd0e4a9583292a2f1098e8fe4b2edda"
thumbprint_algorithm = "SHA1"
}
`, rInt, location, batchAccountSuffix)
Expand All @@ -157,7 +157,7 @@ resource "azurerm_batch_certificate" "test" {
account_name = "${azurerm_batch_account.test.name}"
certificate = "${filebase64("testdata/batch_certificate.pfx")}"
format = "Pfx"
thumbprint = "42C107874FD0E4A9583292A2F1098E8FE4B2EDDA"
thumbprint = "42c107874fd0e4a9583292a2f1098e8fe4b2edda"
thumbprint_algorithm = "SHA1"
}
`, rInt, location, batchAccountSuffix)
Expand All @@ -181,7 +181,7 @@ resource "azurerm_batch_certificate" "test" {
account_name = "${azurerm_batch_account.test.name}"
certificate = "${filebase64("testdata/batch_certificate.cer")}"
format = "Cer"
thumbprint = "312D31A79FA0CEF49C00F769AFC2B73E9F4EDF34"
thumbprint = "312d31a79fa0cef49c00f769afc2b73e9f4edf34"
thumbprint_algorithm = "SHA1"
}
`, rInt, location, batchAccountSuffix)
Expand All @@ -206,7 +206,7 @@ resource "azurerm_batch_certificate" "test" {
certificate = "${filebase64("testdata/batch_certificate.cer")}"
format = "Cer"
password = "should not have a password for Cer"
thumbprint = "312D31A79FA0CEF49C00F769AFC2B73E9F4EDF34"
thumbprint = "312d31a79fa0cef49c00f769afc2b73e9f4edf34"
thumbprint_algorithm = "SHA1"
}
`, rInt, location, batchAccountSuffix)
Expand Down