Skip to content

Commit

Permalink
Added mocks for interfaces and also unit tests for functions used in …
Browse files Browse the repository at this point in the history
…history handler (cadence-workflow#5882)

* Added mocks for interface and also unit tests for functions in history handler

* lint

* Revert "Added mocks for interface and also unit tests for functions in history handler"

This reverts commit c6879a5.

* clean up

* Add more unit tests for history handler
  • Loading branch information
timl3136 authored Apr 6, 2024
1 parent c7b58d0 commit 5a0a853
Show file tree
Hide file tree
Showing 5 changed files with 701 additions and 30 deletions.
2 changes: 2 additions & 0 deletions common/taskTokenSerializerInterfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

//go:generate mockgen -package $GOPACKAGE -source $GOFILE -destination taskTokenSerializerInterfaces_mock.go -self_package github.com/uber/cadence/common

package common

type (
Expand Down
116 changes: 116 additions & 0 deletions common/taskTokenSerializerInterfaces_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions service/history/events/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const (
eventsChanSize = 1000
)

//go:generate mockgen -package $GOPACKAGE -source $GOFILE -destination notifier_mock.go -self_package github.com/uber/cadence/service/history/events

type (
// Notifier is a pub-sub for sending and receiving notifications on new history events
Notifier interface {
Expand Down
124 changes: 124 additions & 0 deletions service/history/events/notifier_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a0a853

Please sign in to comment.