Popularity
1.9
Growing
Activity
9.1
-
18
1
4

Programming language: Go
License: Apache License 2.0
Tags: Testing     Mock    

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.

Do you think we are missing an alternative of go-localstack or a related project?

Add another 'Mock' Package

README

go-localstack

Actions Status codecov Go Report Card PkgGoDev License

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

func TestWithLocalStack(t *testing.T) {
    l, err := localstack.NewInstance()
    if err != nil {
        t.Fatalf("Could not connect to Docker %v", err)
    }
    if err := l.Start(); err != nil {
        t.Fatalf("Could not start localstack %v", err)
    }

    session.NewSession(&aws.Config{
        Credentials: credentials.NewStaticCredentials("not", "empty", ""),
        DisableSSL:  aws.Bool(true),
        Region:      aws.String(endpoints.UsWest1RegionID),
        Endpoint:    aws.String(l.Endpoint(localstack.SQS)),
    })

    myTest()

    if err := l.Stop(); err != nil {
        t.Fatalf("Could not stop localstack %v", err)
    }
}


*Note that all licence references and agreements mentioned in the go-localstack README section above are relevant to that project's source code only.