mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 15:15:28 +00:00
Added test + misc
This commit is contained in:
parent
8ad3ebcd05
commit
0a09b9e451
@ -15,7 +15,9 @@ func TestSSLProtocol(t *testing.T) {
|
|||||||
|
|
||||||
testutils.Init(options)
|
testutils.Init(options)
|
||||||
templateID := "testing-ssl"
|
templateID := "testing-ssl"
|
||||||
request := &Request{}
|
request := &Request{
|
||||||
|
Address: "{{Hostname}}",
|
||||||
|
}
|
||||||
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
executerOpts := testutils.NewMockExecuterOptions(options, &testutils.TemplateInfo{
|
||||||
ID: templateID,
|
ID: templateID,
|
||||||
Info: model.Info{SeverityHolder: severity.Holder{Severity: severity.Low}, Name: "test"},
|
Info: model.Info{SeverityHolder: severity.Holder{Severity: severity.Low}, Name: "test"},
|
||||||
@ -23,8 +25,12 @@ func TestSSLProtocol(t *testing.T) {
|
|||||||
err := request.Compile(executerOpts)
|
err := request.Compile(executerOpts)
|
||||||
require.Nil(t, err, "could not compile ssl request")
|
require.Nil(t, err, "could not compile ssl request")
|
||||||
|
|
||||||
err = request.ExecuteWithResults("google.com:443", nil, nil, func(event *output.InternalWrappedEvent) {})
|
var gotEvent output.InternalEvent
|
||||||
|
err = request.ExecuteWithResults("google.com:443", nil, nil, func(event *output.InternalWrappedEvent) {
|
||||||
|
gotEvent = event.InternalEvent
|
||||||
|
})
|
||||||
require.Nil(t, err, "could not run ssl request")
|
require.Nil(t, err, "could not run ssl request")
|
||||||
|
require.NotEmpty(t, gotEvent, "could not get event items")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetAddress(t *testing.T) {
|
func TestGetAddress(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user