Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Jun 22, 2023
1 parent 4c8ac67 commit 4cfaadc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,13 @@ func (r *Runner) RunEnumeration() {
gologger.Warning().Msgf("Could not decode response: %s\n", err)
continue
}
dslVars, _ := dslVariables()
dslVars, err := dslVariables()
if err != nil {
gologger.Warning().Msgf("Could not retrieve dsl variables: %s\n", err)
continue
}
flatMap := make(map[string]interface{})

for _, v := range dslVars {
flatMap[v] = rawMap[v]
}
Expand Down
2 changes: 1 addition & 1 deletion runner/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type Result struct {
// function to get dsl variables from result struct
func dslVariables() ([]string, error) {
fakeResult := Result{}
fieldsToIgnore := []string{"Hashes", "ResponseHeader", "Err"}
fieldsToIgnore := []string{"Hashes", "ResponseHeader", "Err", "KnowledgeBase"}
if err := faker.FakeData(&fakeResult, options.WithFieldsToIgnore(fieldsToIgnore...)); err != nil {
return nil, err
}
Expand Down

0 comments on commit 4cfaadc

Please sign in to comment.