Sorting the errors

This commit is contained in:
tombuildsstuff 2017-03-31 20:24:40 +01:00
parent 6a6536f901
commit 2a3f16267a
6 changed files with 11 additions and 11 deletions

View File

@ -132,7 +132,7 @@ func resourceArmServiceBusNamespaceRead(d *schema.ResourceData, meta interface{}
resp, err := namespaceClient.Get(resGroup, name)
if err != nil {
return fmt.Errorf("Error making Read request on Azure ServiceBus Namespace %s: %s", name, err)
return fmt.Errorf("Error making Read request on Azure ServiceBus Namespace %s: %+v", name, err)
}
if resp.StatusCode == http.StatusNotFound {
d.SetId("")
@ -147,7 +147,7 @@ func resourceArmServiceBusNamespaceRead(d *schema.ResourceData, meta interface{}
keys, err := namespaceClient.ListKeys(resGroup, name, serviceBusNamespaceDefaultAuthorizationRule)
if err != nil {
log.Printf("[ERROR] Unable to List default keys for Namespace %s: %s", name, err)
log.Printf("[ERROR] Unable to List default keys for Namespace %s: %+v", name, err)
} else {
d.Set("default_primary_connection_string", keys.PrimaryConnectionString)
d.Set("default_secondary_connection_string", keys.SecondaryConnectionString)
@ -173,7 +173,7 @@ func resourceArmServiceBusNamespaceDelete(d *schema.ResourceData, meta interface
resp, err := namespaceClient.Delete(resGroup, name, make(chan struct{}))
if resp.StatusCode != http.StatusNotFound {
return fmt.Errorf("Error issuing Azure ARM delete request of ServiceBus Namespace'%s': %s", name, err)
return fmt.Errorf("Error issuing Azure ARM delete request of ServiceBus Namespace'%s': %+v", name, err)
}
return nil

View File

@ -140,7 +140,7 @@ func testCheckAzureRMServiceBusNamespaceDestroy(s *terraform.State) error {
}
if resp.StatusCode != http.StatusNotFound {
return fmt.Errorf("ServiceBus Namespace still exists:\n%#v", resp.NamespaceProperties)
return fmt.Errorf("ServiceBus Namespace still exists:\n%+v", resp)
}
}
@ -165,7 +165,7 @@ func testCheckAzureRMServiceBusNamespaceExists(name string) resource.TestCheckFu
resp, err := conn.Get(resourceGroup, namespaceName)
if err != nil {
return fmt.Errorf("Bad: Get on serviceBusNamespacesClient: %s", err)
return fmt.Errorf("Bad: Get on serviceBusNamespacesClient: %+v", err)
}
if resp.StatusCode == http.StatusNotFound {

View File

@ -163,7 +163,7 @@ func resourceArmServiceBusSubscriptionRead(d *schema.ResourceData, meta interfac
resp, err := client.Get(resGroup, namespaceName, topicName, name)
if err != nil {
return fmt.Errorf("Error making Read request on Azure ServiceBus Subscription %s: %s", name, err)
return fmt.Errorf("Error making Read request on Azure ServiceBus Subscription %s: %+v", name, err)
}
if resp.StatusCode == http.StatusNotFound {
d.SetId("")

View File

@ -105,7 +105,7 @@ func testCheckAzureRMServiceBusSubscriptionDestroy(s *terraform.State) error {
}
if resp.StatusCode != http.StatusNotFound {
return fmt.Errorf("ServiceBus Subscription still exists:\n%#v", resp.SubscriptionProperties)
return fmt.Errorf("ServiceBus Subscription still exists:\n%+v", resp.SubscriptionProperties)
}
}
@ -132,7 +132,7 @@ func testCheckAzureRMServiceBusSubscriptionExists(name string) resource.TestChec
resp, err := client.Get(resourceGroup, namespaceName, topicName, subscriptionName)
if err != nil {
return fmt.Errorf("Bad: Get on serviceBusSubscriptionsClient: %s", err)
return fmt.Errorf("Bad: Get on serviceBusSubscriptionsClient: %+v", err)
}
if resp.StatusCode == http.StatusNotFound {

View File

@ -173,7 +173,7 @@ func resourceArmServiceBusTopicRead(d *schema.ResourceData, meta interface{}) er
resp, err := client.Get(resGroup, namespaceName, name)
if err != nil {
return fmt.Errorf("Error making Read request on Azure ServiceBus Topic %s: %s", name, err)
return fmt.Errorf("Error making Read request on Azure ServiceBus Topic %s: %+v", name, err)
}
if resp.StatusCode == http.StatusNotFound {
d.SetId("")

View File

@ -165,7 +165,7 @@ func testCheckAzureRMServiceBusTopicDestroy(s *terraform.State) error {
}
if resp.StatusCode != http.StatusNotFound {
return fmt.Errorf("ServiceBus Topic still exists:\n%#v", resp.TopicProperties)
return fmt.Errorf("ServiceBus Topic still exists:\n%+v", resp.TopicProperties)
}
}
@ -191,7 +191,7 @@ func testCheckAzureRMServiceBusTopicExists(name string) resource.TestCheckFunc {
resp, err := client.Get(resourceGroup, namespaceName, topicName)
if err != nil {
return fmt.Errorf("Bad: Get on serviceBusTopicsClient: %s", err)
return fmt.Errorf("Bad: Get on serviceBusTopicsClient: %+v", err)
}
if resp.StatusCode == http.StatusNotFound {