Skip to content

Commit

Permalink
Update task data keys
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Aufart <maufart@redhat.com>
  • Loading branch information
aufi committed Jun 7, 2024
1 parent c146d4b commit b64edb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions analysis/analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,21 @@ func TestApplicationAnalysis(t *testing.T) {
// Prepare and submit the analyze task.
// tc.Task.Addon = analyzerAddon
tc.Task.Application = &api.Ref{ID: tc.Application.ID}
taskData := tc.Task.Data
taskData := api.Map{}
//for _, r := range tc.CustomRules {
// taskData.Rules = append(taskData.Rules, api.Ref{ID: r.ID, Name: r.Name})
//}
if tc.Labels != nil {
fmt.Println("pridavam rules LABELS")
taskData["rules"] = api.Map{"labels": tc.Labels}
}
//if tc.Rules["path"] != "" { // TODO: better rules handling
// taskData["rules"] = tc.Rules
//}
if tc.WithDeps == true {
taskData["mode"].(api.Map)["WithDeps"] = true
taskData["mode"] = api.Map{"withDeps": true}
}
if tc.Binary {
taskData["mode"].(api.Map)["Binary"] = true
taskData["mode"].(api.Map)["binary"] = true
}
if tc.Scope != nil {
taskData["scope"] = *tc.Scope
Expand Down
2 changes: 1 addition & 1 deletion analysis/analyzer_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var defaultAnalyzerData = api.Map{
// Diva: true,
},
"scope": api.Map{
"WithKnown": false,
"withKnown": false,
},
"rules": api.Map{
"path": "",
Expand Down

0 comments on commit b64edb3

Please sign in to comment.