@@ -31,6 +31,8 @@ resource "hostingde_record" "test" {
31
31
// Verify type attribute.
32
32
resource .TestCheckResourceAttr ("hostingde_record.test" , "type" , "CNAME" ),
33
33
// Verify email attribute.
34
+ resource .TestCheckResourceAttr ("hostingde_zone.test" , "email" , "hostmaster@example2.test" ),
35
+ // Verify content attribute.
34
36
resource .TestCheckResourceAttr ("hostingde_record.test" , "content" , "www.example.com" ),
35
37
// Verify dynamic values have any value set in the state.
36
38
resource .TestCheckResourceAttrSet ("hostingde_record.test" , "id" ),
@@ -45,12 +47,12 @@ resource "hostingde_zone" "test" {
45
47
type = "NATIVE"
46
48
email = "hostmaster@example2.test"
47
49
}
48
- resource "hostingde_record" "test_mx2 " {
50
+ resource "hostingde_record" "test_mx " {
49
51
zone_id = hostingde_zone.test.id
50
52
name = "example2.test"
51
53
type = "MX"
52
- content = "mail2 .example2.test"
53
- priority = 20
54
+ content = "mail .example2.test"
55
+ priority = 10
54
56
}
55
57
` ,
56
58
Check : resource .ComposeAggregateTestCheckFunc (
@@ -60,20 +62,12 @@ resource "hostingde_record" "test_mx2" {
60
62
resource .TestCheckResourceAttr ("hostingde_record.test_mx" , "type" , "MX" ),
61
63
// Verify priority attribute.
62
64
resource .TestCheckResourceAttr ("hostingde_record.test_mx" , "priority" , "10" ),
63
- // Verify email attribute.
65
+ // Verify content attribute.
64
66
resource .TestCheckResourceAttr ("hostingde_record.test_mx" , "content" , "mail.example2.test" ),
65
- // Verify dynamic values have any value set in the state.
66
- resource .TestCheckResourceAttrSet ("hostingde_record.test_mx" , "id" ),
67
- // Verify name attribute.
68
- resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "name" , "example2.test" ),
69
- // Verify type attribute.
70
- resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "type" , "MX" ),
71
- // Verify priority attribute.
72
- resource .TestCheckResourceAttr ("hostingde_record.test_mx2" , "priority" , "20" ),
73
67
// Verify email attribute.
74
- resource .TestCheckResourceAttr ("hostingde_record.test_mx2 " , "content " , "mail2. example2.test" ),
68
+ resource .TestCheckResourceAttr ("hostingde_zone.test " , "email " , "hostmaster@ example2.test" ),
75
69
// Verify dynamic values have any value set in the state.
76
- resource .TestCheckResourceAttrSet ("hostingde_record.test_mx2 " , "id" ),
70
+ resource .TestCheckResourceAttrSet ("hostingde_record.test_mx " , "id" ),
77
71
),
78
72
},
79
73
// Create and read TXT testing
@@ -97,7 +91,7 @@ resource "hostingde_record" "test_dkim" {
97
91
resource .TestCheckResourceAttr ("hostingde_record.test_dkim" , "name" , "default._domainkey.example2.test" ),
98
92
// Verify type attribute.
99
93
resource .TestCheckResourceAttr ("hostingde_record.test_dkim" , "type" , "TXT" ),
100
- // Verify email attribute.
94
+ // Verify content attribute.
101
95
resource .TestCheckResourceAttr ("hostingde_record.test_dkim" , "content" , "v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyla9hW3TvoXvZQxwzaJ4SZ9ict1HU3E6+FwLWniGe6TiPtcYrjTIsiudQb8tltibOXiS+qqbxzI+quI3aGU6osy2rIv0eWo8+oOOqOD9pERftc/aqe51cXuv4kPqwvpXEBwrXFWVM+VxivEubUJ7eKkFyXJpelv0LslXv/MmYbUyed6dF+reOGZCsvnbiRv74qdxbAL/25j62E8WrnxzJwhUtx/JhdBOjsHBvuw9hy6rZsVJL9eXayWyGRV6qmsLRzsRSBs+mDrgmKk4dugADd11+A03ics3i8hplRoWDkqnNKz1qy4f5TsV6v9283IANrAzRfHwX8EvNiFsBz+ZCQIDAQAB" ),
102
96
// Verify dynamic values have any value set in the state.
103
97
resource .TestCheckResourceAttrSet ("hostingde_record.test_dkim" , "id" ),
@@ -148,7 +142,7 @@ resource "hostingde_record" "test_mx" {
148
142
Check : resource .ComposeAggregateTestCheckFunc (
149
143
// Verify content attribute.
150
144
resource .TestCheckResourceAttr ("hostingde_record.test_mx" , "content" , "mail2.example2.test" ),
151
- // Verify content attribute.
145
+ // Verify priority attribute.
152
146
resource .TestCheckResourceAttr ("hostingde_record.test_mx" , "priority" , "20" ),
153
147
),
154
148
},
0 commit comments