@@ -104,6 +104,24 @@ func TestAccSumologicMonitorsLibraryMonitor_schemaValidations(t *testing.T) {
104104 },
105105 },
106106 })
107+
108+ for _ , monitorConfig := range allInvalidMonitors {
109+ testNameSuffix := acctest .RandString (16 )
110+
111+ testName := "terraform_test_invalid_monitor_" + testNameSuffix
112+
113+ resource .Test (t , resource.TestCase {
114+ PreCheck : func () { testAccPreCheck (t ) },
115+ Providers : testAccProviders ,
116+ CheckDestroy : testAccCheckMonitorsLibraryMonitorDestroy (monitorsLibraryMonitor ),
117+ Steps : []resource.TestStep {
118+ {
119+ Config : monitorConfig (testName ),
120+ ExpectError : regexp .MustCompile ("config is invalid" ),
121+ },
122+ },
123+ })
124+ }
107125}
108126
109127func TestAccSumologicMonitorsLibraryMonitor_triggersTimeRangeDiffSuppression (t * testing.T ) {
@@ -312,27 +330,6 @@ func TestAccSumologicMonitorsLibraryMonitor_create_all_monitor_types(t *testing.
312330 }
313331}
314332
315- func TestAccSumologicMonitorsLibraryMonitorFail_scenarios (t * testing.T ) {
316- var monitorsLibraryMonitor MonitorsLibraryMonitor
317- for _ , monitorConfig := range allInvalidMonitors {
318- testNameSuffix := acctest .RandString (16 )
319-
320- testName := "terraform_test_invalid_monitor_" + testNameSuffix
321-
322- resource .Test (t , resource.TestCase {
323- PreCheck : func () { testAccPreCheck (t ) },
324- Providers : testAccProviders ,
325- CheckDestroy : testAccCheckMonitorsLibraryMonitorDestroy (monitorsLibraryMonitor ),
326- Steps : []resource.TestStep {
327- {
328- Config : monitorConfig (testName ),
329- ExpectError : regexp .MustCompile ("config is invalid" ),
330- },
331- },
332- })
333- }
334- }
335-
336333func TestAccSumologicMonitorsLibraryMonitor_update (t * testing.T ) {
337334 var monitorsLibraryMonitor MonitorsLibraryMonitor
338335 testNameSuffix := acctest .RandString (16 )
0 commit comments