Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrozek authored and rdimitrov committed Oct 6, 2023
1 parent 108b6ae commit 5a5bc1e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion internal/engine/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ default allow = true`,
Definition: json.RawMessage(marshalledRTD),
}, nil)

ruleEvalId := uuid.New()
// Upload passing status
mockStore.EXPECT().
UpsertRuleEvaluations(gomock.Any(), db.UpsertRuleEvaluationsParams{
Expand All @@ -185,7 +186,24 @@ default allow = true`,
ArtifactID: uuid.NullUUID{},
RuleTypeID: ruleTypeID,
Entity: db.EntitiesRepository,
}).Return(nil)
}).Return(ruleEvalId, nil)

ruleEvalDetailsId := uuid.New()
mockStore.EXPECT().
UpsertRuleDetailsEval(gomock.Any(), db.UpsertRuleDetailsEvalParams{
RuleEvalID: ruleEvalId,
Status: db.EvalStatusTypesSuccess,
Details: "",
}).Return(ruleEvalDetailsId, nil)

ruleEvalRemediationId := uuid.New()
mockStore.EXPECT().
UpsertRuleDetailsRemediate(gomock.Any(), db.UpsertRuleDetailsRemediateParams{
RuleEvalID: ruleEvalId,
Status: db.RemediationStatusTypesSkipped,
Details: "",
}).Return(ruleEvalRemediationId, nil)

// -- end expectations

tmpdir := t.TempDir()
Expand Down

0 comments on commit 5a5bc1e

Please sign in to comment.