Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanaReddy0M committed May 6, 2024
1 parent 26220d4 commit 2fa7e70
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/integration-test/profile-loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ var profileLoaderTestcases = []TestCaseInfo{
type profileLoaderByRelFile struct{}

func (h *profileLoaderByRelFile) Execute(testName string) error {
results, err := testutils.RunNucleiWithArgsAndGetResults(false, "-tl", "-tp", "kev.yml")
results, err := testutils.RunNucleiWithArgsAndGetResults(false, "-tl", "-tp", "cloud.yml")
if err != nil {
return errorutil.NewWithErr(err).Msgf("failed to load template with id")
}
if len(results) < 267 {
return fmt.Errorf("incorrect result: expected more results than %d, got %v", 267, len(results))
if len(results) < 100 {
return fmt.Errorf("incorrect result: expected more results than %d, got %v", 100, len(results))
}
return nil
}

type profileLoaderById struct{}

func (h *profileLoaderById) Execute(testName string) error {
results, err := testutils.RunNucleiWithArgsAndGetResults(false, "-tl", "-tp", "kev")
results, err := testutils.RunNucleiWithArgsAndGetResults(false, "-tl", "-tp", "cloud")
if err != nil {
return errorutil.NewWithErr(err).Msgf("failed to load template with id")
}
if len(results) < 267 {
return fmt.Errorf("incorrect result: expected more results than %d, got %v", 267, len(results))
if len(results) < 100 {
return fmt.Errorf("incorrect result: expected more results than %d, got %v", 100, len(results))
}
return nil
}
Expand Down

0 comments on commit 2fa7e70

Please sign in to comment.