temporalio / sdk-go

Temporal Go SDK
https://docs.temporal.io/application-development?lang=go
MIT License
481 stars 197 forks source link

expose mock Calls for testing activity order #1515

Closed yinsidij closed 3 weeks ago

yinsidij commented 3 weeks ago

What was changed

Why?

I would like to test the order of activity execution in the workflow unit tests. Looks like it’s lack of the feature. Exposing the Calls of mock would be one solution.

Checklist

  1. Closes

  2. How was this tested:

  3. Any docs updates needed?

Quinn-With-Two-Ns commented 3 weeks ago

To test the order of mocks you can use OnActivity(..).NotBefore() This is a feature in testify https://github.com/stretchr/testify/issues/741

yinsidij commented 3 weeks ago

stretchr/testify#741

Thank you for the quick response @Quinn-With-Two-Ns . it works.