Skip to content

Commit

Permalink
Updating the simple_lb tags test from # to %
Browse files Browse the repository at this point in the history
  • Loading branch information
buzztroll committed Jul 12, 2016
1 parent 73dde85 commit 0660a30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions builtin/providers/azurerm/resource_arm_simple_lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func resourceArmSimpleLbCreate(d *schema.ResourceData, meta interface{}) error {
log.Printf("[resourceArmSimpleLb] ERROR LB retrieving load balancer %s", err.Error())
return fmt.Errorf("Error issuing Azure ARM get request for load balancer '%s': %s", name, err)
}

log.Printf("XXXXXX 2 %s", respLb.Tags)
return flattenAllOfLb(respLb, d, meta)
}

Expand Down Expand Up @@ -610,6 +610,12 @@ func resourceArmSimpleLbUpdate(d *schema.ResourceData, meta interface{}) error {
}
log.Printf("[resourceArmSimpleLb] Set the rules on the LB. Provision State %s", *respLb.Properties.ProvisioningState)

respLb, err = lbClient.Get(resGrp, name, "")
if err != nil {
log.Printf("[resourceArmSimpleLb] ERROR LB retrieving load balancer %s", err.Error())
return fmt.Errorf("Error issuing Azure ARM get request for load balancer '%s': %s", name, err)
}
log.Printf("XXXXXX 3 %s", respLb.Tags)
return flattenAllOfLb(respLb, d, meta)
}

Expand Down Expand Up @@ -655,7 +661,7 @@ func resourceArmSimpleLbRead(d *schema.ResourceData, meta interface{}) error {
}
return fmt.Errorf("Error reading the state of the load balancer off Azure: %s", err)
}

log.Printf("XXXXXX 1 %s", loadBalancer.Tags)
return flattenAllOfLb(loadBalancer, d, meta)
}

Expand Down
4 changes: 2 additions & 2 deletions builtin/providers/azurerm/resource_arm_simple_lb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestAccAzureRMSimpleLB_updateTag(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSimpleLBExists("azurerm_simple_lb.test"),
resource.TestCheckResourceAttr(
"azurerm_simple_lb.test", "tags.#", "2"),
"azurerm_simple_lb.test", "tags.%", "2"),
resource.TestCheckResourceAttr(
"azurerm_simple_lb.test", "tags.environment", "Production"),
resource.TestCheckResourceAttr(
Expand All @@ -65,7 +65,7 @@ func TestAccAzureRMSimpleLB_updateTag(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMSimpleLBExists("azurerm_simple_lb.test"),
resource.TestCheckResourceAttr(
"azurerm_simple_lb.test", "tags.#", "1"),
"azurerm_simple_lb.test", "tags.%", "1"),
resource.TestCheckResourceAttr(
"azurerm_simple_lb.test", "tags.environment", "staging"),
),
Expand Down

0 comments on commit 0660a30

Please sign in to comment.