Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: endpoint to rerun test assertions on result #489

Merged
merged 3 commits into from
May 13, 2022

Conversation

mathnogueira
Copy link
Member

This PR adds an endpoint /tests/:testID/results/:resultID/rerun to rerun the assertion engine on a result.

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@@ -160,6 +160,23 @@ func (e *defaultAssertionRunner) setResults(result *openapi.TestRunResult, testR
result.AssertionResultState = allTestsPassed
}

func (e *defaultAssertionRunner) RunAssertions(request AssertionRequest) {
e.inputChannel <- request
func (e *defaultAssertionRunner) RunAssertions(ctx context.Context, result openapi.TestRunResult) error {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is adding an unnecesary responsibility to this function. I think the controller can easily do this setup and keep the assertion runner just running assertions

@mathnogueira mathnogueira force-pushed the feat/rerun-test-result-endpoint branch from da79bdd to 86945a1 Compare May 13, 2022 20:42
@mathnogueira mathnogueira requested a review from schoren May 13, 2022 20:45
Copy link
Collaborator

@schoren schoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@mathnogueira mathnogueira merged commit 27e52ae into main May 13, 2022
@mathnogueira mathnogueira deleted the feat/rerun-test-result-endpoint branch May 13, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants