feat(requestid): validate uuid
This commit is contained in:
		@ -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))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user