Skip to content

Commit

Permalink
fix tests & format strings
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Feb 12, 2019
1 parent 0e52c9a commit ad21e0f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions azurerm/resource_arm_key_vault_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,10 @@ func resourceArmKeyVaultCertificateRead(d *schema.ResourceData, meta interface{}

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Certificate %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Certificate %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Certificate %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Certificate %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down Expand Up @@ -528,10 +528,10 @@ func resourceArmKeyVaultCertificateDelete(d *schema.ResourceData, meta interface

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Certificate %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Certificate %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Certificate %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Certificate %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down
12 changes: 6 additions & 6 deletions azurerm/resource_arm_key_vault_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ func resourceArmKeyVaultKeyUpdate(d *schema.ResourceData, meta interface{}) erro

ok, err := azure.KeyVaultExists(ctx, vaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Key %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Key %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Key %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Key %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down Expand Up @@ -252,10 +252,10 @@ func resourceArmKeyVaultKeyRead(d *schema.ResourceData, meta interface{}) error

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Key %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Key %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Key %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Key %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down Expand Up @@ -313,10 +313,10 @@ func resourceArmKeyVaultKeyDelete(d *schema.ResourceData, meta interface{}) erro

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Key %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Key %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Key %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Key %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down
12 changes: 6 additions & 6 deletions azurerm/resource_arm_key_vault_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ func resourceArmKeyVaultSecretUpdate(d *schema.ResourceData, meta interface{}) e

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Secret %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Secret %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Secret %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Secret %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down Expand Up @@ -235,10 +235,10 @@ func resourceArmKeyVaultSecretRead(d *schema.ResourceData, meta interface{}) err

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Secret %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Secret %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Secret %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Secret %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down Expand Up @@ -290,10 +290,10 @@ func resourceArmKeyVaultSecretDelete(d *schema.ResourceData, meta interface{}) e

ok, err := azure.KeyVaultExists(ctx, keyVaultClient, *keyVaultId)
if err != nil {
return fmt.Errorf("Error checking if key vault %q for Secret %q in Vault at url %q exists: %v", keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
return fmt.Errorf("Error checking if key vault %q for Secret %q in Vault at url %q exists: %v", *keyVaultId, id.Name, id.KeyVaultBaseUrl, err)
}
if !ok {
log.Printf("[DEBUG] Secret %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, keyVaultId, id.KeyVaultBaseUrl)
log.Printf("[DEBUG] Secret %q Key Vault %q was not found in Key Vault at URI %q - removing from state", id.Name, *keyVaultId, id.KeyVaultBaseUrl)
d.SetId("")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion azurerm/resource_arm_key_vault_secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ resource "azurerm_key_vault_secret" "test" {
`, rString, location, rString, rString)
}

func testAccAzureRMKeyVaultSecret_basicClassic(rString string, location string) string {
func testAccAzureRMKeyVaultSecret_basicClasic(rString string, location string) string {
return fmt.Sprintf(`
data "azurerm_client_config" "current" {}
Expand Down

0 comments on commit ad21e0f

Please sign in to comment.