@@ -49,6 +49,7 @@ func TestMonitorCRUD(t *testing.T) {
4949 }
5050 if found == nil {
5151 t .Fatal ("Monitor m1 not found" )
52+ return
5253 }
5354 if found .Name != "Updated M1" || found .Interval != 120 {
5455 t .Error ("Update verification failed" )
@@ -427,6 +428,7 @@ func TestSetMonitorActive_PauseMonitor(t *testing.T) {
427428 }
428429 if found == nil {
429430 t .Fatal ("Monitor not found" )
431+ return
430432 }
431433 if ! found .Active {
432434 t .Error ("Monitor should be active initially" )
@@ -483,6 +485,7 @@ func TestSetMonitorActive_ResumeMonitor(t *testing.T) {
483485 }
484486 if found == nil {
485487 t .Fatal ("Monitor not found" )
488+ return
486489 }
487490 if ! found .Active {
488491 t .Error ("Monitor should be active after resume" )
@@ -706,6 +709,7 @@ func TestSetMonitorActive_PausePreservesOtherFields(t *testing.T) {
706709 }
707710 if found == nil {
708711 t .Fatal ("Monitor not found" )
712+ return
709713 }
710714 if found .Name != "Preserve Test" {
711715 t .Errorf ("Name changed unexpectedly: %s" , found .Name )
@@ -791,6 +795,7 @@ func TestGetDailyUptimeStats_WithChecks(t *testing.T) {
791795 }
792796 if todayStat == nil {
793797 t .Fatalf ("Today's stats not found in results. Looking for %s" , todayStr )
798+ return
794799 }
795800 if todayStat .Total != 10 {
796801 t .Errorf ("Expected 10 total checks today, got %d" , todayStat .Total )
@@ -924,6 +929,7 @@ func TestMonitor_PerMonitorOverrides(t *testing.T) {
924929 }
925930 if found == nil {
926931 t .Fatal ("Monitor not found" )
932+ return
927933 }
928934 if found .ConfirmationThreshold == nil || * found .ConfirmationThreshold != 5 {
929935 t .Errorf ("Expected ConfirmationThreshold=5, got %v" , found .ConfirmationThreshold )
@@ -959,6 +965,7 @@ func TestMonitor_PerMonitorOverrides(t *testing.T) {
959965 }
960966 if found == nil {
961967 t .Fatal ("Monitor not found" )
968+ return
962969 }
963970 if found .ConfirmationThreshold != nil {
964971 t .Errorf ("Expected ConfirmationThreshold=nil, got %v" , * found .ConfirmationThreshold )
@@ -996,6 +1003,7 @@ func TestMonitor_PerMonitorOverrides(t *testing.T) {
9961003 }
9971004 if found == nil {
9981005 t .Fatal ("Monitor not found" )
1006+ return
9991007 }
10001008 if found .ConfirmationThreshold == nil || * found .ConfirmationThreshold != 7 {
10011009 t .Errorf ("Expected ConfirmationThreshold=7, got %v" , found .ConfirmationThreshold )
@@ -1035,6 +1043,7 @@ func TestMonitor_PerMonitorOverrides(t *testing.T) {
10351043 }
10361044 if found == nil {
10371045 t .Fatal ("Monitor not found" )
1046+ return
10381047 }
10391048 if found .ConfirmationThreshold != nil {
10401049 t .Errorf ("Expected ConfirmationThreshold=nil after clear, got %v" , * found .ConfirmationThreshold )
@@ -1074,6 +1083,7 @@ func TestMonitor_PerMonitorOverrides(t *testing.T) {
10741083 }
10751084 if found == nil {
10761085 t .Fatal ("Monitor not found" )
1086+ return
10771087 }
10781088 if found .ConfirmationThreshold == nil || * found .ConfirmationThreshold != 8 {
10791089 t .Errorf ("Expected ConfirmationThreshold=8, got %v" , found .ConfirmationThreshold )
@@ -1109,6 +1119,7 @@ func TestMonitor_LatencyThresholdRoundtrip(t *testing.T) {
11091119 }
11101120 if found == nil {
11111121 t .Fatal ("Monitor not found" )
1122+ return
11121123 }
11131124 if found .LatencyThreshold == nil || * found .LatencyThreshold != 2000 {
11141125 t .Errorf ("Expected LatencyThreshold=2000, got %v" , found .LatencyThreshold )
@@ -1137,6 +1148,7 @@ func TestMonitor_LatencyThresholdRoundtrip(t *testing.T) {
11371148 }
11381149 if found == nil {
11391150 t .Fatal ("Monitor not found" )
1151+ return
11401152 }
11411153 if found .LatencyThreshold != nil {
11421154 t .Errorf ("Expected LatencyThreshold=nil, got %v" , * found .LatencyThreshold )
@@ -1169,6 +1181,7 @@ func TestMonitor_LatencyThresholdRoundtrip(t *testing.T) {
11691181 }
11701182 if found == nil {
11711183 t .Fatal ("Monitor not found" )
1184+ return
11721185 }
11731186 if found .LatencyThreshold == nil || * found .LatencyThreshold != 500 {
11741187 t .Errorf ("Expected LatencyThreshold=500, got %v" , found .LatencyThreshold )
@@ -1202,6 +1215,7 @@ func TestMonitor_LatencyThresholdRoundtrip(t *testing.T) {
12021215 }
12031216 if found == nil {
12041217 t .Fatal ("Monitor not found" )
1218+ return
12051219 }
12061220 if found .LatencyThreshold != nil {
12071221 t .Errorf ("Expected LatencyThreshold=nil after clear, got %v" , * found .LatencyThreshold )
@@ -1250,9 +1264,11 @@ func TestMonitorCRUD_RequestConfig(t *testing.T) {
12501264 }
12511265 if found == nil {
12521266 t .Fatal ("Monitor m-rc1 not found" )
1267+ return
12531268 }
12541269 if found .RequestConfig == nil {
12551270 t .Fatal ("Expected RequestConfig to be non-nil" )
1271+ return
12561272 }
12571273 rc := found .RequestConfig
12581274 if rc .Method != "POST" {
@@ -1302,9 +1318,11 @@ func TestMonitorCRUD_RequestConfig(t *testing.T) {
13021318 }
13031319 if found == nil {
13041320 t .Fatal ("Monitor m-rc1 not found after update" )
1321+ return
13051322 }
13061323 if found .RequestConfig == nil {
13071324 t .Fatal ("Expected RequestConfig to be non-nil after update" )
1325+ return
13081326 }
13091327 if found .RequestConfig .Method != "HEAD" {
13101328 t .Errorf ("Expected method HEAD after update, got %s" , found .RequestConfig .Method )
@@ -1329,6 +1347,7 @@ func TestMonitorCRUD_RequestConfig(t *testing.T) {
13291347 }
13301348 if found == nil {
13311349 t .Fatal ("Monitor m-rc1 not found after nil update" )
1350+ return
13321351 }
13331352 if found .RequestConfig != nil {
13341353 t .Errorf ("Expected RequestConfig to be nil after clearing, got %+v" , found .RequestConfig )
0 commit comments