mirror of https://github.com/daffainfo/nuclei.git
16 lines
409 B
Go
16 lines
409 B
Go
package http
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestCanCluster(t *testing.T) {
|
|
req := &Request{Unsafe: true}
|
|
require.False(t, req.CanCluster(&Request{}), "could cluster unsafe request")
|
|
|
|
req = &Request{Path: []string{"{{BaseURL}}"}, Method: "GET"}
|
|
require.True(t, req.CanCluster(&Request{Path: []string{"{{BaseURL}}"}, Method: "GET"}), "could not cluster GET request")
|
|
}
|