Skip to content

Commit

Permalink
Merge pull request #193 from nutanix/fix-testacc
Browse files Browse the repository at this point in the history
Fix Testacc
  • Loading branch information
marinsalinas authored Nov 24, 2020
2 parents a83eca4 + 2768c19 commit c25d3fd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,10 @@ func (c *Client) NewRequest(ctx context.Context, method, urlStr string, body int
req.Header.Add("Accept", mediaType)
req.Header.Add("User-Agent", c.UserAgent)
if c.Cookies != nil {
log.Printf("[DEBUG] Adding cookies to request\n")
for _, i := range c.Cookies {
req.AddCookie(i)
}
} else {
log.Printf("[DEBUG] Adding basic auth to request\n")
req.Header.Add("Authorization", "Basic "+
base64.StdEncoding.EncodeToString([]byte(c.Credentials.Username+":"+c.Credentials.Password)))
}
Expand Down
2 changes: 1 addition & 1 deletion nutanix/data_source_nutanix_category_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ resource "nutanix_category_value" "test_value"{
data "nutanix_category_key" "test_key_value" {
name = nutanix_category_key.test_key_value.name
name = nutanix_category_value.test_value.name //creating implicit dependency
}`
4 changes: 0 additions & 4 deletions nutanix/resource_nutanix_subnet_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package nutanix

import (
"encoding/json"
"fmt"
"regexp"
"strings"
Expand Down Expand Up @@ -172,9 +171,6 @@ func testAccCheckNutanixSubnetExists(n string) resource.TestCheckFunc {
return fmt.Errorf("not found: %s", n)
}

pretty, _ := json.MarshalIndent(rs, "", " ")
fmt.Print("\n\n[DEBUG] State of Subnet", string(pretty))

if rs.Primary.ID == "" {
return fmt.Errorf("no ID is set")
}
Expand Down

0 comments on commit c25d3fd

Please sign in to comment.