Skip to content

Commit

Permalink
Fix acceptance tests (#66)
Browse files Browse the repository at this point in the history
* replaced all bskyb.com with example.com

* changed forward zone tests

* changed forward zone tests

* changed forward zone ns_group

* changed forward zone ns_group

* changed forward zone secondary grid secondary ns

* changed forward zone secondary grid secondary ns

* changed forward zone secondary grid secondary ns

* grid member did not exist

* changed tsig expected valut

* changed tsig name

* changed tsig expected name

* changed tsig expected name
  • Loading branch information
ruimoreira authored Sep 29, 2017
1 parent e78738c commit acf5d46
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 61 deletions.
2 changes: 1 addition & 1 deletion infoblox/resource_a_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func TestAccResourceARecord(t *testing.T) {

randInt := acctest.RandInt()
recordName := fmt.Sprintf("a-record-test-%d.slupaas.bskyb.com", randInt)
recordName := fmt.Sprintf("a-record-test-%d.example.com", randInt)
resourceName := "infoblox_arecord.acctest"

fmt.Printf("\n\nAcc Test record name is %s\n\n", recordName)
Expand Down
8 changes: 4 additions & 4 deletions infoblox/resource_cname_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
func TestAccInfobloxCNAMEBasic(t *testing.T) {

randomInt := acctest.RandInt()
cname := fmt.Sprintf("acctest-infoblox-cname-%d.slupaas.bskyb.com", randomInt)
cnameUpdate := fmt.Sprintf("acctest-infoblox-cname-%d-renamed.slupaas.bskyb.com", randomInt)
canonical := fmt.Sprintf("acctest-infoblox-canonical-%d.slupaas.bskyb.com", randomInt)
canonicalUpdate := fmt.Sprintf("acctest-infoblox-canonical-update-%d.slupaas.bskyb.com", randomInt)
cname := fmt.Sprintf("acctest-infoblox-cname-%d.example.com", randomInt)
cnameUpdate := fmt.Sprintf("acctest-infoblox-cname-%d-renamed.example.com", randomInt)
canonical := fmt.Sprintf("acctest-infoblox-canonical-%d.example.com", randomInt)
canonicalUpdate := fmt.Sprintf("acctest-infoblox-canonical-update-%d.example.com", randomInt)
cnameResourceName := "infoblox_cname_record.acctest"

fmt.Printf("\n\nCNAME is %s\n\n", cname)
Expand Down
8 changes: 4 additions & 4 deletions infoblox/resource_mx_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestResourceMXRecord(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccResourceMXRecordExists("mail_exchanger", mailExchanger),
resource.TestCheckResourceAttr(resourceName, "mail_exchanger", mailExchanger),
resource.TestCheckResourceAttr(resourceName, "name", "slupaas.bskyb.com"),
resource.TestCheckResourceAttr(resourceName, "name", "example.com"),
resource.TestCheckResourceAttr(resourceName, "comment", "this is a comment"),
resource.TestCheckResourceAttr(resourceName, "disable", "false"),
resource.TestCheckResourceAttr(resourceName, "preference", "120"),
Expand All @@ -39,7 +39,7 @@ func TestResourceMXRecord(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
testAccResourceMXRecordExists("mail_exchanger", mailExchanger),
resource.TestCheckResourceAttr(resourceName, "mail_exchanger", mailExchanger),
resource.TestCheckResourceAttr(resourceName, "name", "slupaas.bskyb.com"),
resource.TestCheckResourceAttr(resourceName, "name", "example.com"),
resource.TestCheckResourceAttr(resourceName, "comment", "this is a comment edited for a disabled zone"),
resource.TestCheckResourceAttr(resourceName, "disable", "true"),
resource.TestCheckResourceAttr(resourceName, "preference", "10"),
Expand All @@ -62,7 +62,7 @@ func testAccResourceMXRecordExists(key, value string) resource.TestCheckFunc {
func testAccResourceMXRecordCreateTemplate(mailExchanger string) string {
return fmt.Sprintf(`
resource "infoblox_mx_record" "mxtest1" {
name = "slupaas.bskyb.com"
name = "example.com"
comment = "this is a comment"
disable = false
mail_exchanger = "%s"
Expand All @@ -78,7 +78,7 @@ func testAccResourceMXRecordCreateTemplate(mailExchanger string) string {
func testAccResourceMXRecordUpdateTemplate(mailExchanger string) string {
return fmt.Sprintf(`
resource "infoblox_mx_record" "mxtest1" {
name = "slupaas.bskyb.com"
name = "example.com"
comment = "this is a comment edited for a disabled zone"
disable = true
mail_exchanger = "%s"
Expand Down
2 changes: 1 addition & 1 deletion infoblox/resource_ns_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
func TestAccInfobloxNSRecordBasic(t *testing.T) {

randomInt := acctest.RandInt()
nameServerZoneName := "paas-testing.com"
nameServerZoneName := "example.com"
createNameServer := fmt.Sprintf("acctest-infoblox-%d-nameserver.%s", randomInt, nameServerZoneName)
updateNameServer := fmt.Sprintf("acctest-infoblox-%d-nameserver-update.%s", randomInt, nameServerZoneName)
nsResourceName := "infoblox_ns_record.acctest"
Expand Down
10 changes: 5 additions & 5 deletions infoblox/resource_srv_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func TestAccResourceSRVRecord(t *testing.T) {

randInt := acctest.RandInt()
recordName := fmt.Sprintf("srv-recordcreated-%d.slupaas.bskyb.com", randInt)
recordName := fmt.Sprintf("srv-recordcreated-%d.example.com", randInt)
resourceName := "infoblox_srv_record.acctest"

fmt.Printf("\n\nAcc Test record name is %s\n\n", recordName)
Expand All @@ -31,7 +31,7 @@ func TestAccResourceSRVRecord(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "name", recordName),
resource.TestCheckResourceAttr(resourceName, "port", "8080"),
resource.TestCheckResourceAttr(resourceName, "priority", "99"),
resource.TestCheckResourceAttr(resourceName, "target", "craig4test.testzone.slupaas.bskyb.com"),
resource.TestCheckResourceAttr(resourceName, "target", "craig4test.testzone.example.com"),
resource.TestCheckResourceAttr(resourceName, "weight", "10"),
resource.TestCheckResourceAttr(resourceName, "comment", "test test"),
resource.TestCheckResourceAttr(resourceName, "ttl", "900"),
Expand All @@ -44,7 +44,7 @@ func TestAccResourceSRVRecord(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "name", recordName),
resource.TestCheckResourceAttr(resourceName, "port", "65"),
resource.TestCheckResourceAttr(resourceName, "priority", "50"),
resource.TestCheckResourceAttr(resourceName, "target", "craig4test.testzone.slupaas.bskyb.com"),
resource.TestCheckResourceAttr(resourceName, "target", "craig4test.testzone.example.com"),
resource.TestCheckResourceAttr(resourceName, "weight", "20"),
resource.TestCheckResourceAttr(resourceName, "comment", "test test test test"),
resource.TestCheckResourceAttr(resourceName, "ttl", "4000"),
Expand All @@ -66,7 +66,7 @@ func testAccResourceSRVRecordCreateTemplate(srvRecordName string) string {
name = "%s"
port = 8080
priority = 99
target = "craig4test.testzone.slupaas.bskyb.com"
target = "craig4test.testzone.example.com"
weight = 10
comment = "test test"
ttl = 900
Expand All @@ -79,7 +79,7 @@ func testAccResourceSRVRecordUpdateTemplate(srvRecordName string) string {
name = "%s"
port = 65
priority = 50
target = "craig4test.testzone.slupaas.bskyb.com"
target = "craig4test.testzone.example.com"
weight = 20
comment = "test test test test"
ttl = 4000
Expand Down
2 changes: 1 addition & 1 deletion infoblox/resource_txt_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func TestAccResourceTXTRecord(t *testing.T) {

randInt := acctest.RandInt()
recordName := fmt.Sprintf("txt-record-created-%d.slupaas.bskyb.com", randInt)
recordName := fmt.Sprintf("txt-record-created-%d.example.com", randInt)
resourceName := "infoblox_txtrecord.acctest"

fmt.Printf("\n\nAcc Test record name is %s\n\n", recordName)
Expand Down
20 changes: 10 additions & 10 deletions infoblox/resource_zone_auth_secondary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func TestAccInfobloxZoneAuthSecondary(t *testing.T) {

testFQDN := "acctest-infoblox-zone-auth-secondary" + strconv.Itoa(acctest.RandInt()) + ".slupaas.bskyb.com"
testFQDN := "acctest-infoblox-zone-auth-secondary" + strconv.Itoa(acctest.RandInt()) + ".example.com"
testFQDNResourceName := "infoblox_zone_auth.acctestsecondary"

fmt.Printf("\n\nForward FQDN is %s\n\n", testFQDN)
Expand All @@ -36,7 +36,7 @@ func TestAccInfobloxZoneAuthSecondary(t *testing.T) {
resource.TestCheckResourceAttr(testFQDNResourceName, "prefix", "128/16"),
resource.TestCheckResourceAttr(testFQDNResourceName, "disable", "false"),
resource.TestCheckResourceAttr(testFQDNResourceName, "dns_integrity_enable", "false"),
resource.TestCheckResourceAttr(testFQDNResourceName, "dns_integrity_member", "nonprdibxdns01.bskyb.com"),
resource.TestCheckResourceAttr(testFQDNResourceName, "dns_integrity_member", "infoblox.localdomain"),
resource.TestCheckResourceAttr(testFQDNResourceName, "locked", "true"),
resource.TestCheckResourceAttr(testFQDNResourceName, "copy_xfer_to_notify", "false"),
resource.TestCheckResourceAttr(testFQDNResourceName, "use_copy_xfer_to_notify", "false"),
Expand All @@ -47,7 +47,7 @@ func TestAccInfobloxZoneAuthSecondary(t *testing.T) {
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.1.address", "192.168.101.10"),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.1.permission", "ALLOW"),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.2._struct", "tsigac"),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.2.tsig_key", "0jnu3SdsMvzzlmTDPYRceA=="),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.2.tsig_key", "zPpXDZqUcmTOkInh8Vn74Q=="),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.2.tsig_key_alg", "HMAC-SHA256"),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.2.tsig_key_name", "acc-test.key"),
resource.TestCheckResourceAttr(testFQDNResourceName, "allow_update.2.use_tsig_key_name", "false"),
Expand All @@ -64,7 +64,7 @@ func TestAccInfobloxZoneAuthSecondary(t *testing.T) {
resource.TestCheckResourceAttr(testFQDNResourceName, "prefix", "128-189"),
resource.TestCheckResourceAttr(testFQDNResourceName, "disable", "true"),
resource.TestCheckResourceAttr(testFQDNResourceName, "dns_integrity_enable", "false"),
resource.TestCheckResourceAttr(testFQDNResourceName, "dns_integrity_member", "nonprdibxdns01.bskyb.com"),
resource.TestCheckResourceAttr(testFQDNResourceName, "dns_integrity_member", "infoblox.localdomain"),
resource.TestCheckResourceAttr(testFQDNResourceName, "locked", "false"),
resource.TestCheckResourceAttr(testFQDNResourceName, "copy_xfer_to_notify", "true"),
resource.TestCheckResourceAttr(testFQDNResourceName, "use_copy_xfer_to_notify", "true"),
Expand Down Expand Up @@ -102,7 +102,7 @@ resource "infoblox_zone_auth" "acctestsecondary" {
prefix = "128/16"
disable = false
dns_integrity_enable = false
dns_integrity_member = "nonprdibxdns01.bskyb.com"
dns_integrity_member = "infoblox.localdomain"
locked = true
copy_xfer_to_notify = false
use_copy_xfer_to_notify = false
Expand All @@ -112,7 +112,7 @@ resource "infoblox_zone_auth" "acctestsecondary" {
address = "10.0.0.2"
name = "ns1.example.com"
stealth = false
tsig_key = "dFghJkcXb5tyUio3eWo021=="
tsig_key = "zPpXDZqUcmTOkInh8Vn74Q=="
tsig_key_alg = "HMAC-SHA256"
tsig_key_name = "example-key"
use_tsig_key_name = false
Expand All @@ -121,7 +121,7 @@ resource "infoblox_zone_auth" "acctestsecondary" {
grid_secondaries = [
{
lead = false
name = "slunonprdigm01.bskyb.com"
name = "infoblox.localdomain"
enable_preferred_primaries = false
stealth = false
},
Expand All @@ -139,7 +139,7 @@ resource "infoblox_zone_auth" "acctestsecondary" {
},
{
_struct = "tsigac"
tsig_key = "0jnu3SdsMvzzlmTDPYRceA=="
tsig_key = "zPpXDZqUcmTOkInh8Vn74Q=="
tsig_key_alg = "HMAC-SHA256"
tsig_key_name = "acc-test.key"
use_tsig_key_name = false
Expand All @@ -157,7 +157,7 @@ resource "infoblox_zone_auth" "acctestsecondary" {
prefix = "128-189"
disable = true
dns_integrity_enable = false
dns_integrity_member = "nonprdibxdns01.bskyb.com"
dns_integrity_member = "infoblox.localdomain"
locked = false
copy_xfer_to_notify = true
use_copy_xfer_to_notify = true
Expand All @@ -176,7 +176,7 @@ resource "infoblox_zone_auth" "acctestsecondary" {
grid_secondaries = [
{
lead = false
name = "slunonprdigm01.bskyb.com"
name = "infoblox.localdomain"
enable_preferred_primaries = false
stealth = false
},
Expand Down
Loading

0 comments on commit acf5d46

Please sign in to comment.