Skip to content

Commit a590ed0

Browse files
committed
providers/mailgun: tests passing, compiling
1 parent 64bc356 commit a590ed0

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

builtin/providers/mailgun/resource_mailgun_domain_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ func TestAccMailgunDomain_Basic(t *testing.T) {
4343
func testAccCheckMailgunDomainDestroy(s *terraform.State) error {
4444
client := testAccProvider.Meta().(*mailgun.Client)
4545

46-
for _, rs := range s.Resources {
46+
for _, rs := range s.RootModule().Resources {
4747
if rs.Type != "mailgun_domain" {
4848
continue
4949
}
5050

51-
_, err := client.RetrieveDomain(rs.ID)
51+
_, err := client.RetrieveDomain(rs.Primary.ID)
5252

5353
if err == nil {
5454
return fmt.Errorf("Domain still exists")
@@ -91,25 +91,25 @@ func testAccCheckMailgunDomainAttributes(DomainResp *mailgun.DomainResponse) res
9191

9292
func testAccCheckMailgunDomainExists(n string, DomainResp *mailgun.DomainResponse) resource.TestCheckFunc {
9393
return func(s *terraform.State) error {
94-
rs, ok := s.Resources[n]
94+
rs, ok := s.RootModule().Resources[n]
9595

9696
if !ok {
9797
return fmt.Errorf("Not found: %s", n)
9898
}
9999

100-
if rs.ID == "" {
100+
if rs.Primary.ID == "" {
101101
return fmt.Errorf("No Domain ID is set")
102102
}
103103

104104
client := testAccProvider.Meta().(*mailgun.Client)
105105

106-
resp, err := client.RetrieveDomain(rs.ID)
106+
resp, err := client.RetrieveDomain(rs.Primary.ID)
107107

108108
if err != nil {
109109
return err
110110
}
111111

112-
if resp.Domain.Name != rs.ID {
112+
if resp.Domain.Name != rs.Primary.ID {
113113
return fmt.Errorf("Domain not found")
114114
}
115115

0 commit comments

Comments
 (0)