mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 19:35:27 +00:00
* test(flow): update outdated test cases
Signed-off-by: Dwi Siswanto <git@dw1.io>
* test(multiproto): update outdated test cases
Signed-off-by: Dwi Siswanto <git@dw1.io>
* feat: fixed failing tests
* fixed data race
* fixed memgaurdian race conditiong
* test(customtemplates): use test repo
Signed-off-by: Dwi Siswanto <git@dw1.io>
* feat(customtemplates): add more `{Clone,Pull}Options`
Signed-off-by: Dwi Siswanto <git@dw1.io>
* feat(customtemplates): validate `{Clone,Pull}Options`
Signed-off-by: Dwi Siswanto <git@dw1.io>
* bugfix: fixed failing integration tests for flow and multi
* chore: either 1 or 2 results in interactsh
---------
Signed-off-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Ice3man <nizamulrana@gmail.com>
23 lines
767 B
Go
23 lines
767 B
Go
package main
|
|
|
|
import (
|
|
"github.com/projectdiscovery/nuclei/v3/pkg/testutils"
|
|
)
|
|
|
|
var multiProtoTestcases = []TestCaseInfo{
|
|
{Path: "protocols/multi/dynamic-values.yaml", TestCase: &multiProtoDynamicExtractor{}},
|
|
{Path: "protocols/multi/evaluate-variables.yaml", TestCase: &multiProtoDynamicExtractor{}},
|
|
{Path: "protocols/multi/exported-response-vars.yaml", TestCase: &multiProtoDynamicExtractor{}},
|
|
}
|
|
|
|
type multiProtoDynamicExtractor struct{}
|
|
|
|
// Execute executes a test case and returns an error if occurred
|
|
func (h *multiProtoDynamicExtractor) Execute(templatePath string) error {
|
|
results, err := testutils.RunNucleiTemplateAndGetResults(templatePath, "docs.projectdiscovery.io", debug)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return expectResultsCount(results, 1)
|
|
}
|