@@ -53,11 +53,6 @@ func TestApplicationInstance_Create(t *testing.T) {
53
53
"device_id" ,
54
54
regexp .MustCompile ("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$" ),
55
55
),
56
- resource .TestMatchResourceAttr (
57
- "zedcloud_application_instance.test_tf_provider" ,
58
- "interfaces.0.netinstid" ,
59
- regexp .MustCompile ("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$" ),
60
- ),
61
56
testApplicationInstanceAttributes (t , & got , & expected ),
62
57
),
63
58
},
@@ -103,18 +98,10 @@ func testApplicationInstanceExists(resourceName string, applicationModel *models
103
98
func testApplicationInstanceAttributes (t * testing.T , got , expected * models.AppInstance ) resource.TestCheckFunc {
104
99
return func (s * terraform.State ) error {
105
100
ignoredFields := []string {
106
- "Netinstid" ,
107
- }
108
- opts := cmpopts .IgnoreFields (models.AppInterface {}, ignoredFields ... )
109
- if diff := cmp .Diff (* got .Interfaces [0 ], * expected .Interfaces [0 ], opts ); len (diff ) != 0 {
110
- return fmt .Errorf ("%s: unexpected diff: \n %s" , t .Name (), diff )
111
- }
112
-
113
- ignoredFields = []string {
114
101
"Imvolname" ,
115
102
"Mvolname" ,
116
103
}
117
- opts = cmpopts .IgnoreFields (models.Drive {}, ignoredFields ... )
104
+ opts : = cmpopts .IgnoreFields (models.Drive {}, ignoredFields ... )
118
105
if diff := cmp .Diff (* got .Drives [0 ], * expected .Drives [0 ], opts ); len (diff ) != 0 {
119
106
return fmt .Errorf ("%s: unexpected diff: \n %s" , t .Name (), diff )
120
107
}
0 commit comments