From 284ff218d9e7b240ee932bbec91db89528609b02 Mon Sep 17 00:00:00 2001 From: HAHWUL Date: Sun, 1 Sep 2024 16:30:51 +0900 Subject: [PATCH] fix: update NewMessageID test to check for positive values The NewMessageID test in message_id_test.go was updated to check for positive values instead of non-nil values. This change ensures that the generated message ID is a valid positive integer. --- pkg/har/message_id_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/har/message_id_test.go b/pkg/har/message_id_test.go index 9599c54e..f1029961 100644 --- a/pkg/har/message_id_test.go +++ b/pkg/har/message_id_test.go @@ -8,12 +8,13 @@ func TestNewMessageID(t *testing.T) { }{ { name: "Test case 1", - } + }, } + for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := NewMessageID(); got != nil { - t.Errorf("NewMessageID() = %v, got) + if got := NewMessageID(); got <= 0 { + t.Errorf("NewMessageID() = %v", got) } }) }