Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
Top 23 Go Mock Projects
-
Project mention: How do you unit-test code that reaches out to the db, without introducing interfaces everywhere? | /r/golang | 2023-08-16
-
Project mention: go-ecommerce-microservices: A practical e-commerce microservices, built with cqrs, event sourcing, vertical slice architecture, event-driven architecture. | /r/golang | 2023-08-26
Some of the features: - ✅ Using Vertical Slice Architecture as a high level architecture - ✅ Using Event Driven Architecture on top of RabbitMQ Message Broker with a custom [Event Bus](pkg/messaging/bus/) - ✅ Using Event Sourcing in Audit Based services like [Orders Service](services/orders/) - ✅ Using CQRS Pattern and Mediator Patternon top of Go-MediatR library - ✅ Using Dependency Injection and Inversion of Controlon top of uber-go/fx library - ✅ Using RESTFul api with Echo framework and using swagger with swaggo/swag library - ✅ Using Postgres and EventStoreDB to write databases with fully supports transactions(ACID) - ✅ Using MongoDB and Elastic Search for read databases (NOSQL) - ✅ Using OpenTelemetry for collection Distributed Tracing with using Jaeger and Zipkin - ✅ Using OpenTelemetry for collection Metrics with using Prometheus and Grafana - ✅ Using Unit Test for testing small units with mocking dependent classes and using Mockery for mocking dependencies - ✅ Using End2End Test and Integration Test for testing features with all of their real dependeinces using docker containers (cleanup tests) and testcontainers-go library
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
hoverfly
Lightweight service virtualization/ API simulation / API mocking tool for developers and testers
-
-
-
-
service-pattern-go
Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
-
3 years ago I created a internal library where I worked to setup the testing with the db's. One param was the schema directory and the other one was the path of the data insertion file. It worked really well but was a little slow. It was a little bit weird to configure the container to run the tests. As I would have to give access to go container that ran the unit tests access to docker. But back then I was running boot2docker and made things very cumbersome. I think with a local docker things would be way simpler. I ended up using and normal DB from the CI/CD and https://github.com/DATA-DOG/go-txdb If I had to do it again I might do an hybrid in-between the two solutions
-
-
-
-
Since the OpenAPI can effectively describe our resources, we can reuse it to generate a dummy server that can be later used for development and testing purposes without bootstrapping any actual services. There some tools available that can help us with this task, such as Prism, OpenAPI Mock, OpenAPI Backend and the MSW library we have already seen.
-
-
-
-
go-smtp-mock
SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server.
-
-
-
-
timex
A test-friendly replacement for golang's time package [managed by soy-programador] (by cabify)
-
gadgeto
Gadgeto! is a collection of tools that aim to facilitate the development of REST APIs in Go.
I've been using wI2L/fizz with loopfz/gadgeto for autogenerating OpenAPI 3 documentation, but both libraries seem to have died down and there are many pull requests that haven't gotten any attention.
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Go Mock related posts
- How do you unit-test code that reaches out to the db, without introducing interfaces everywhere?
- Direction of mockery: absorb different styles of mocks into this project · vektra mockery · Discussion #671
- Maintainership of Go’s official gomock repo has been transferred to Uber.
- Uber Now Maintains Gomock
- grpcmock: Mock gRPC servers dynamically
- Google Stopped Maintaining GoMock
- Go: Write Mock Test cases using Mockery and
-
A note from our sponsor - InfluxDB
www.influxdata.com | 19 Mar 2024
Index
What are some of the best open-source Mock projects in Go? This list will help you:
Project | Stars | |
---|---|---|
1 | go-sqlmock | 5,759 |
2 | mockery | 5,506 |
3 | hoverfly | 2,297 |
4 | gock | 2,002 |
5 | httpmock | 1,854 |
6 | counterfeiter | 912 |
7 | service-pattern-go | 775 |
8 | Mmock | 656 |
9 | go-txdb | 609 |
10 | gripmock | 602 |
11 | minimock | 545 |
12 | killgrave | 479 |
13 | openapi-mock | 460 |
14 | redismock | 248 |
15 | charlatan | 200 |
16 | govcr | 160 |
17 | go-smtp-mock | 109 |
18 | gomockhandler | 102 |
19 | go-github-mock | 89 |
20 | go-localstack | 74 |
21 | timex | 70 |
22 | gadgeto | 53 |
23 | go-sdk | 42 |