Popularity
3.6
Growing
Activity
0.0
-
61
1
15
Programming language: Go
License: Apache License 2.0
go-localstack alternatives and similar packages
Based on the "Mock" category.
Alternatively, view go-localstack alternatives based on common mentions on social networks and blogs.
-
gomock
GoMock is a mocking framework for the Go programming language. -
go-sqlmock
Sql mock driver for golang to test database interactions -
hoverfly
Lightweight service virtualization/API simulation tool for developers and testers -
counterfeiter
A tool for generating self-contained, type-safe test doubles in go -
Mmock
Mmock is an HTTP mocking application for testing and fast prototyping -
minimock
Powerful mock generation tool for Go programming language -
govcr
HTTP mock for Golang: record and replay HTTP/HTTPS interactions for offline testing -
smtpmock
SMTP mock server written on Golang. Mimic any 📤 SMTP server behavior for your test environment with fake SMTP server. -
MockItOut
A language agnostic HTTP mock server for quick stub testing -
mooncake
:moon_cake: A simple way to generate mocks for multiple purposes -
mockserver
Super slim & blazing fast mock server to replace the Java/NPM counterpart mockserver -
genmock
Go mocking system with code generator for building calls of the interface methods.
Clean code begins in your IDE with SonarLint
Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Promo
www.sonarlint.org
Do you think we are missing an alternative of go-localstack or a related project?
Popular Comparisons
README
go-localstack
Go Wrapper for using localstack in go testing
Installation
Please make sure that you have Docker installed.
go get github.com/elgohr/go-localstack
Usage
With SDK V2
func ExampleLocalstackWithContextSdkV2() {
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
l, err := localstack.NewInstance()
if err != nil {
log.Fatalf("Could not connect to Docker %v", err)
}
if err := l.StartWithContext(ctx); err != nil {
log.Fatalf("Could not start localstack %v", err)
}
cfg, err := config.LoadDefaultConfig(ctx,
config.WithRegion("us-east-1"),
config.WithEndpointResolverWithOptions(aws.EndpointResolverWithOptionsFunc(func(_, _ string, _ ...interface{}) (aws.Endpoint, error) {
return aws.Endpoint{
PartitionID: "aws",
URL: l.EndpointV2(localstack.SQS),
SigningRegion: "us-east-1",
HostnameImmutable: true,
}, nil
})),
config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("dummy", "dummy", "dummy")),
)
if err != nil {
log.Fatalf("Could not get config %v", err)
}
myTestWithV2(cfg)
}
With SDK V1
func TestWithLocalStack(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
l, err := localstack.NewInstance()
if err != nil {
log.Fatalf("Could not connect to Docker %v", err)
}
if err := l.StartWithContext(ctx); err != nil {
log.Fatalf("Could not start localstack %v", err)
}
myTestWith(&aws.Config{
Credentials: credentials.NewStaticCredentials("not", "empty", ""),
DisableSSL: aws.Bool(true),
Region: aws.String(endpoints.UsWest1RegionID),
Endpoint: aws.String(l.Endpoint(localstack.SQS)),
})
}
*Note that all licence references and agreements mentioned in the go-localstack README section above
are relevant to that project's source code only.