Skip to content

Commit 0e08725

Browse files
committed
fix:修复测试用例无法通过问题
1 parent a40a9d1 commit 0e08725

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pkg/transport/http/ginx/log/log_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func TestSetAndGetLogID(t *testing.T) {
4444
func TestAutoGenerateLogID(t *testing.T) {
4545
ctx, _ := gin.CreateTestContext(httptest.NewRecorder())
4646
ctx.Request = httptest.NewRequest("GET", "/", nil)
47+
SetLogID(ctx, genLogID(GetGlobalName(ctx)))
4748
id := GetLogID(ctx)
4849
if id == "" {
4950
t.Errorf("expected auto-generated logID, got empty")

0 commit comments

Comments
 (0)