feat(requestid): validate uuid

This commit is contained in:
Muyao CHEN
2024-10-03 14:01:15 +02:00
parent e6389f0fd2
commit ad1d4de7c3
3 changed files with 5 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import (
"testing"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
)
@ -50,4 +51,5 @@ func TestRequestID(t *testing.T) {
_ = performRequest(r, "GET", "/example?a=100")
assert.NotEqual(t, "", got)
assert.NoError(t, uuid.Validate(got))
}