Skip to content

Commit bf54e12

Browse files
fix (tests): remove app interface tests
1 parent c0effc3 commit bf54e12

File tree

4 files changed

+5169
-1558
lines changed

4 files changed

+5169
-1558
lines changed

resources/application_instance_test.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ func TestApplicationInstance_Create(t *testing.T) {
5353
"device_id",
5454
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}$"),
5555
),
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-
),
6156
testApplicationInstanceAttributes(t, &got, &expected),
6257
),
6358
},
@@ -103,18 +98,10 @@ func testApplicationInstanceExists(resourceName string, applicationModel *models
10398
func testApplicationInstanceAttributes(t *testing.T, got, expected *models.AppInstance) resource.TestCheckFunc {
10499
return func(s *terraform.State) error {
105100
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{
114101
"Imvolname",
115102
"Mvolname",
116103
}
117-
opts = cmpopts.IgnoreFields(models.Drive{}, ignoredFields...)
104+
opts := cmpopts.IgnoreFields(models.Drive{}, ignoredFields...)
118105
if diff := cmp.Diff(*got.Drives[0], *expected.Drives[0], opts); len(diff) != 0 {
119106
return fmt.Errorf("%s: unexpected diff: \n%s", t.Name(), diff)
120107
}

0 commit comments

Comments
 (0)