Skip to content

Commit df63ddd

Browse files
committed
reset tests changes and only keep logging
1 parent b90eb45 commit df63ddd

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

sumologic/resource_sumologic_cse_match_list_test.go

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ func TestAccSumologicSCEMatchList_createAndUpdate(t *testing.T) {
4040
Providers: testAccProviders,
4141
CheckDestroy: testAccCSEMatchListDestroy,
4242
Steps: []resource.TestStep{
43-
// Creates a match list with 1 match list item
4443
{
4544
Config: testCreateCSEMatchListConfig(nDefaultTtl, nDescription, nName, nTargetColumn, liDescription, liExpiration, liValue, liCount),
4645
Check: resource.ComposeTestCheckFunc(
@@ -50,17 +49,6 @@ func TestAccSumologicSCEMatchList_createAndUpdate(t *testing.T) {
5049
resource.TestCheckResourceAttrSet(resourceName, "id"),
5150
),
5251
},
53-
// Updates the match list, but keeps the 1 match list item the same
54-
{
55-
Config: testCreateCSEMatchListConfig(uDefaultTtl, uDescription, nName, nTargetColumn, liDescription, liExpiration, liValue, liCount),
56-
Check: resource.ComposeTestCheckFunc(
57-
testCheckCSEMatchListExists(resourceName, &matchList),
58-
testCheckMatchListValues(&matchList, nDefaultTtl, nDescription, nName, nTargetColumn),
59-
testCheckMatchListItemsValuesAndCount(resourceName, liDescription, liExpiration, liValue, liCount),
60-
resource.TestCheckResourceAttrSet(resourceName, "id"),
61-
),
62-
},
63-
// Deletes the 1 match list item and adds 3 new ones
6452
{
6553
Config: testCreateCSEMatchListConfig(uDefaultTtl, uDescription, nName, nTargetColumn, uliDescription, uliExpiration, uliValue, uliCount),
6654
Check: resource.ComposeTestCheckFunc(
@@ -69,7 +57,6 @@ func TestAccSumologicSCEMatchList_createAndUpdate(t *testing.T) {
6957
testCheckMatchListItemsValuesAndCount(resourceName, uliDescription, uliExpiration, uliValue, uliCount),
7058
),
7159
},
72-
// Deletes all the match list items
7360
{
7461
Config: testDeleteCSEMatchListItemConfig(uDefaultTtl, uDescription, nName, nTargetColumn),
7562
Check: resource.ComposeTestCheckFunc(
@@ -107,12 +94,14 @@ func testCreateCSEMatchListConfig(nDefaultTtl int, nDescription string, nName st
10794
var itemsStr = ""
10895

10996
for i := 0; i < numItems; i++ {
97+
id := uuid.New()
98+
11099
itemsStr += fmt.Sprintf(`
111100
items {
112-
description = "%s %d"
101+
description = "%s %d %s"
113102
expiration = "%s"
114-
value = "%s %d"
115-
}`, liDescription, i, liExpiration, liValue, i)
103+
value = "%s %d %s"
104+
}`, liDescription, i, id, liExpiration, liValue, i, id)
116105
}
117106

118107
var str = fmt.Sprintf(`

0 commit comments

Comments
 (0)