Test your code without writing mocks with ephemeral Docker containers 📦 Setup popular services with just a couple lines of code ⏱️ No bash, no yaml, only code 💻

Overview

Gnomock – tests without mocks

🏗️ Spin up entire dependency stack

🎁 Setup initial dependency state – easily!

🏭 Test against actual, close to production software

Spend no time writing mocks

🕹️ Test actual program behavior and side effects

PkgGoDev Test Go Report Card codecov

Gnomock is an integration and end-to-end testing toolkit. It uses Docker to create temporary containers for application dependencies, setup their initial state and clean them up in the end. Gnomock allows to test the code with no mocks wherever possible.

The power of Gnomock is in a variety of Presets, each implementing a specific database, service or other tools. Each preset provides ways of setting up its initial state as easily as possible: SQL schema creation, test data upload into S3, sending test events to Splunk, etc.

The name "Gnomock" stands for "no mock", with a "G" for "Go" 😼 . It also sounds like "gnome", that's why the friendly garden gnome artwork (by Michael Zolotov)

Demo

See for yourself how easy and fast it is to write tests that use actual services running in ephemeral Docker containers:

asciicast

Table of contents

Getting started

Gnomock can be used in two different ways:

  • Imported directly as a package in any Go project
  • Accessed over HTTP running as a daemon in any other language

⚠️ Both ways require an active Docker daemon running locally in the same environment.

Using Gnomock in Go applications

See the following example to get started:

go get github.com/orlangure/gnomock

Setting up a Postgres container with schema setup example:

import (
	"database/sql"

	_ "github.com/lib/pq" // postgres driver
	"github.com/orlangure/gnomock"
	"github.com/orlangure/gnomock/preset/postgres"
)

p := postgres.Preset(
    postgres.WithUser("gnomock", "gnomick"),
    postgres.WithDatabase("mydb"),
    postgres.WithQueriesFile("/var/project/db/schema.sql"),
)
container, _ := gnomock.Start(p)
defer func() { _ = gnomock.Stop(container) }()

connStr := fmt.Sprintf(
    "host=%s port=%d user=%s password=%s  dbname=%s sslmode=disable",
    container.Host, container.DefaultPort(),
    "gnomock", "gnomick", "mydb",
)
db, _ := sql.Open("postgres", connStr)
// db has the required schema and data, and is ready to use

See package reference. For Preset documentation, refer to Presets section.

Using Gnomock in other languages

If you use Go, please refer to Using Gnomock in Go applications section. Otherwise, refer to documentation.

Official presets

The power of Gnomock is in the Presets. Existing Presets with their supported* versions are listed below.

* Supported versions are tested as part of CI pipeline. Other versions might work as well.

Preset Go package HTTP API Go API Supported versions
Localstack (AWS) Go package Docs Reference 0.12.2
Splunk Go package Docs Reference 8.0.2
Redis Go package Docs Reference 5.0.10, 6.0.9
Memcached Go package Docs Reference 1.6.9
MySQL Go package Docs Reference 5.7.32, 8.0.22
MariaDB Go package Docs Reference 10.5.8
PostgreSQL Go package Docs Reference 10.15, 11.10, 12.5, 13.1
Microsoft SQL Server Go package Docs Reference 2017-latest, 2019-latest
MongoDB Go package Docs Reference 3.6.21, 4.4
RabbitMQ Go package Docs Reference 3.8.9-alpine, 3.8.9-management-alpine
Kafka Go package Docs Reference 2.5.1-L0
Elasticsearch Go package Docs Reference 5.6, 6.8.13, 7.9.3
Kubernetes Go package Docs Reference v1.19.3
CockroachDB Go package Docs Reference v19.2.11, v20.1.10

It is possible to use Gnomock directly from Go code without any presets. HTTP API only allows to setup containers using presets that exist in this repository.

Similar projects

Gnomock is not the only project that aims to simplify integration and end-to-end testing by using ephemeral docker containers:

  • testcontainers/testcontainers-go
  • ory/dockertest

These projects are amazing, and they give plenty of flexibility and power to their users. There are many things that are possible with them, but are impossible with Gnomock. Still, below is a short list of things that sometimes give Gnomock an advantage:

  • Gnomock tries to provide a batteries-included solution. Gnomock has a growing number of Presets, each one implementing an integration with a popular external service. For every Preset, there already is a number of "invisible" utilities that transparently relieve you from implementing them yourself:
    • Built-in health check function that you don't even need to know it exists. It makes sure you only get control over a container when it is ready to use.
    • Wrappers for some of the configuration exposed by the container, such as default username/password. You can easily provide your own credentials to connect to the container.
    • Seed data ingestion for your convenience. Sometimes you just need to make sure your queries work given some data. Gnomock puts your data in there with a single line of code. Sometimes you only test a program that consumes messages from Kafka, and Gnomock produces the messages for you with another line of code.
  • Simple API that does not expose anything that happens "under the hood" most of the time. Yet Gnomock allows some additional configuration and custom Preset implementation whenever necessary.
  • Gnomock's vision includes being useful not only in Go projects, but in any projects via HTTP. It already supports almost all its features over HTTP layer, has a clear OpenAPI spec, and even a proof of concept wrapper in Python.
  • Gnomock has a friendly garden gnome mascot 😻

Troubleshooting

Tests with Gnomock take too long and time-out eventually

It happens a lot locally if your internet isn't fast enough to pull docker images used in tests. In CI, such as in Github Actions, the images are downloaded very quickly. To work around this issue locally, pull the image manually before running the tests. You only need to do it once, the images stay in local cache until deleted. For example, to pull Postgres 11 image, run:

docker pull postgres:11

Tests time-out even when the image exists locally

It can happen if the containers can't become ready to use before they time out. By default, Gnomock uses fairly high timeouts for new containers (for starting and for setting them up). If you choose to change default timeout using WithTimeout (timeout in HTTP), it is possible that the values you choose are too short.

Tests pass when run one-by-one, and fail when run in parallel

It happens when you try to start up a lot of containers at the same time. The system, especially in CI environments such as Github Actions, cannot handle the load, and containers fail to become healthy before they time-out. That's the reason Gnomock has a few separate build jobs, each running only a small subset of tests, one package at a time.

Containers fail to setup with a "File not found" error

If you run gnomock as a server, you need to make sure the files you use in your setup are available inside gnomock container. Use -v $(pwd):$(pwd) argument to docker run to mount the current working directory under the same path inside the gnomock container. If you prefer to keep a permanent gnomock container running, you can mount your entire $HOME directory (or any other directory where you keep the code).

Issues
  • Bug:  can't connect to container: canceled after error: %!w(<nil>)

    Bug: can't connect to container: canceled after error: %!w()

    Describe the bug Gnomock fails to connect to containers. I've forked this repo and ran the tests in it and I receive the same error as my own tests. I suspect it has something to do with docker but i'm not sure what, these tests were working before i updated to the newest docker (prior to that I was a few major versions behind). To Reproduce For me, and another colleague just running any tests that call gnomock.Start() causes the error.

    Screenshots Here are some scerens of attempting to run the postgres preset tests, they take forever but eventually they do fail with the following error: === RUN TestPreset/10.15 preset_test.go:37: Error Trace: preset_test.go:37 Error: Received unexpected error: can't connect to container: canceled after error: %!w() Test: TestPreset/10.15 --- FAIL: TestPreset/10.15 (312.93s)

    image

    System (please complete the following information):

    • OS: [e.g. MacOS] Windows 10 Professional
    • Version [e.g. 0.9.2]
    	github.com/orlangure/gnomock v0.12.0
    
    • Docker version
    Client: Docker Engine - Community
    Cloud integration: 1.0.9
    Version:           20.10.5
    API version:       1.41
    Go version:        go1.13.15
    Git commit:        55c4c88
    Built:             Tue Mar  2 20:14:53 2021
    OS/Arch:           windows/amd64
    Context:           default
    Experimental:      true
    
    Server: Docker Engine - Community
    Engine:
     Version:          20.10.5
     API version:      1.41 (minimum version 1.12)
     Go version:       go1.13.15
     Git commit:       363e9a8
     Built:            Tue Mar  2 20:15:47 2021
     OS/Arch:          linux/amd64
     Experimental:     false
    containerd:
     Version:          1.4.3
     GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
    runc:
     Version:          1.0.0-rc92
     GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
    docker-init:
     Version:          0.19.0
     GitCommit:        de40ad0
    
    
    bug 
    opened by KoduIsGreat 12
  • Implement Cassandra preset

    Implement Cassandra preset

    A short guide on implementing a new preset: https://github.com/orlangure/gnomock/blob/master/CONTRIBUTING.md#new-presets

    MySQL preset for inspiration: https://github.com/orlangure/gnomock/tree/master/preset/mysql

    The objective is to implement a new Preset that spins up Cassandra docker container, sets up its initial state (user provided data), waits for it to become ready and kills it in the end.

    Please note that there are multiple steps required to create a new preset (see the guide above). I'm here to help 😼

    enhancement help wanted 
    opened by orlangure 8
  • Bug: gnomockd in github action 'services:' & 'container:' requires preallocated exposed port range

    Bug: gnomockd in github action 'services:' & 'container:' requires preallocated exposed port range

    Describe the bug When using gnomockd as a GitHub Actions "service container" outside the container needs to connect to not only the gnomockd port, but also the ports of the services it starts.

    This works when using services on the default runner container, however it fails when the services are run on a specified container.

    In order for that to work, the service needs to expose 23042, which works, however the ports of the started services also need to be exposed, so they can be seen in sibling containers.

    One way to remedy this is to expose large ranges of ports which gnomockd is likely to end up being given, like -p 24000-26000:24000-26000, however that fails because of https://github.com/moby/moby/issues/11185

    In order to get around that, gnomockd would need to force the service containers to be started with ports from a smaller preallocated range.

    It might be possible for gnomockd to detect which ports were exposed when its container was set up (i.e. the docker -p 24000-24500:24000-24500). If not, the same range in the docker -p argument needs to be passed to gnomockd as a cli arg so that it knows which range are visible outside the container.

    To Reproduce In order to verify the created services can be accessed, I am using:

    nc -vvv -z 127.0.0.1 $(curl 127.0.0.1:23042/start/mongo -d '{}' | jq .ports.default.port)

    https://github.com/jayvdb/gnomock/blob/demo-github-action/.github/workflows/test.yaml contains four jobs.

    https://github.com/jayvdb/gnomock/actions/runs/1836345457 is the output.

    Ignore the first and fourth.

    The second shows "services" working normally with image orlangure/gnomock (which is an old version of gnomockd). For some reason, only port 23042 needs to be exposed. I tried removing that, and it fails.

    The third shows that using "container: .." for a job breaks gnomockd. It is able to connect to port 23042, but not to the port where the created service is hosted.

    The fourth is a more manual but incomplete attempt at trying to get the github action to work with a sibling container. Even connecting to port 23042 fails.

    Expected behavior It should be possible to tell gnomockd to use a predetermined port range for services it starts, so that it is possible to expose them allowing the services started by gnomockd to be accessed from a sibling container.

    System (please complete the following information):

    • OS: GitHub Actions runner ubuntu-latest (focal)
    • Version: https://github.com/orlangure/gnomock/commit/9770ce0849ed193427470c01454225cae2cc9870 - v0.19.0+21
    • Docker version: GitHub Actions runner default
    opened by jayvdb 7
  • Ryuk from testcontainers adoption

    Ryuk from testcontainers adoption

    Testcontainers have a really nice feature to cleanup stuff with help of https://github.com/testcontainers/moby-ryuk https://github.com/testcontainers/testcontainers-go/blob/master/reaper.go

    Would you consider that in your library? Or maybe the question one step further - is it possible to adopt low-level testcontainers api under the hood? As I really like api of gnomock, however testcontainer maintainers doing a great job keeping away all the docker issues.

    enhancement 
    opened by lanwen 6
  • Kubernetes preset

    Kubernetes preset

    It would be incredibly useful to have a Kubernetes preset, that spins up an empty cluster (maybe https://k3s.io/) and gives code access to it in some sort (https://github.com/kubernetes/client-go)?

    enhancement gnomockd swagger 
    opened by sh0rez 6
  • Support explicit port mappings in remote mode

    Support explicit port mappings in remote mode

    When gnomock runs in server mode, it is impossible to control the port mappings created by the presets. In this commit I add an ability to override preset-specific named ports by any other values in order to control which ports are allocated by the remote gnomock instance.

    This feature is a bit fragile, because the user is required to study the preset before attempting to override its built-in values. Custom named ports must expose the ports with the same names and internal ports for the override to work. Basically, only the "host port" value should be changed.

    This commit fixes https://github.com/orlangure/gnomock/issues/441.

    opened by orlangure 5
  • Bug: gnomock-cleaner not work well in M1(arm64)

    Bug: gnomock-cleaner not work well in M1(arm64)

    Describe the bug StartCustom cleaner image maybe(random) hang at the M1 system. docker logs print this

    no specific platform was requested
    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
    

    To Reproduce Start any preset in M1

    Expected behavior work well

    System (please complete the following information):

    • OS: MacOS
    • Version 12.2
    • Docker version 20.10.7

    Please add arm64 platform docker images in the dockerhub

    opened by kkHAIKE 4
  • Postgres Preset: Add support for timezone

    Postgres Preset: Add support for timezone

    Hey !

    I needed something like this for a project I'm working on, and though it would be useful for someone else. What do you think about this ?

    It was fun doing this, if you need anything else, let me know !

    P.S. Big thanks for this project !

    opened by pawndev 4
  • Bump github.com/aws/aws-sdk-go from 1.44.37 to 1.44.57

    Bump github.com/aws/aws-sdk-go from 1.44.37 to 1.44.57

    Bumps github.com/aws/aws-sdk-go from 1.44.37 to 1.44.57.

    Release notes

    Sourced from github.com/aws/aws-sdk-go's releases.

    Release v1.44.57 (2022-07-18)

    Service Client Updates

    • service/discovery: Updates service API and documentation
      • Add AWS Agentless Collector details to the GetDiscoverySummary API response
    • service/ec2: Updates service documentation
      • Documentation updates for Amazon EC2.
    • service/elasticache: Updates service API and documentation
      • Adding AutoMinorVersionUpgrade in the DescribeReplicationGroups API
    • service/kms: Updates service API, documentation, and paginators
      • Added support for the SM2 KeySpec in China Partition Regions
    • service/mediapackage: Updates service API and documentation
      • This release adds "IncludeIframeOnlyStream" for Dash endpoints and increases the number of supported video and audio encryption presets for Speke v2
    • service/sagemaker: Updates service API, documentation, and paginators
      • Amazon SageMaker Edge Manager provides lightweight model deployment feature to deploy machine learning models on requested devices.
    • service/sso-admin: Updates service API, documentation, and paginators

    Release v1.44.56 (2022-07-15)

    Service Client Updates

    • service/datasync: Updates service documentation
    • service/drs: Updates service API and documentation
    • service/evidently: Updates service API, documentation, and paginators
    • service/wafv2: Updates service API and documentation

    Release v1.44.55 (2022-07-14)

    Service Client Updates

    • service/athena: Updates service API and documentation
      • This release updates data types that contain either QueryExecutionId, NamedQueryId or ExpectedBucketOwner. Ids must be between 1 and 128 characters and contain only non-whitespace characters. ExpectedBucketOwner must be 12-digit string.
    • service/codeartifact: Updates service API and documentation
    • service/config: Updates service API and documentation
    • service/ec2: Updates service API
      • This release adds flow logs for Transit Gateway to allow customers to gain deeper visibility and insights into network traffic through their Transit Gateways.
    • service/fms: Updates service API and documentation
    • service/glue: Updates service API and documentation
      • This release adds an additional worker type for Glue Streaming jobs.
    • service/inspector2: Updates service API and documentation
    • service/kendra: Updates service API, documentation, and paginators
      • This release adds AccessControlConfigurations which allow you to redefine your document level access control without the need for content re-indexing.
    • service/nimble: Updates service API and documentation
    • service/outposts: Updates service API and documentation
    • service/sagemaker: Updates service API and documentation
      • This release adds support for G5, P4d, and C6i instance types in Amazon SageMaker Inference and increases the number of hyperparameters that can be searched from 20 to 30 in Amazon SageMaker Automatic Model Tuning

    Release v1.44.54 (2022-07-13)

    ... (truncated)

    Changelog

    Sourced from github.com/aws/aws-sdk-go's changelog.

    Release v1.44.57 (2022-07-18)

    Service Client Updates

    • service/discovery: Updates service API and documentation
      • Add AWS Agentless Collector details to the GetDiscoverySummary API response
    • service/ec2: Updates service documentation
      • Documentation updates for Amazon EC2.
    • service/elasticache: Updates service API and documentation
      • Adding AutoMinorVersionUpgrade in the DescribeReplicationGroups API
    • service/kms: Updates service API, documentation, and paginators
      • Added support for the SM2 KeySpec in China Partition Regions
    • service/mediapackage: Updates service API and documentation
      • This release adds "IncludeIframeOnlyStream" for Dash endpoints and increases the number of supported video and audio encryption presets for Speke v2
    • service/sagemaker: Updates service API, documentation, and paginators
      • Amazon SageMaker Edge Manager provides lightweight model deployment feature to deploy machine learning models on requested devices.
    • service/sso-admin: Updates service API, documentation, and paginators

    Release v1.44.56 (2022-07-15)

    Service Client Updates

    • service/datasync: Updates service documentation
    • service/drs: Updates service API and documentation
    • service/evidently: Updates service API, documentation, and paginators
    • service/wafv2: Updates service API and documentation

    Release v1.44.55 (2022-07-14)

    Service Client Updates

    • service/athena: Updates service API and documentation
      • This release updates data types that contain either QueryExecutionId, NamedQueryId or ExpectedBucketOwner. Ids must be between 1 and 128 characters and contain only non-whitespace characters. ExpectedBucketOwner must be 12-digit string.
    • service/codeartifact: Updates service API and documentation
    • service/config: Updates service API and documentation
    • service/ec2: Updates service API
      • This release adds flow logs for Transit Gateway to allow customers to gain deeper visibility and insights into network traffic through their Transit Gateways.
    • service/fms: Updates service API and documentation
    • service/glue: Updates service API and documentation
      • This release adds an additional worker type for Glue Streaming jobs.
    • service/inspector2: Updates service API and documentation
    • service/kendra: Updates service API, documentation, and paginators
      • This release adds AccessControlConfigurations which allow you to redefine your document level access control without the need for content re-indexing.
    • service/nimble: Updates service API and documentation
    • service/outposts: Updates service API and documentation
    • service/sagemaker: Updates service API and documentation
      • This release adds support for G5, P4d, and C6i instance types in Amazon SageMaker Inference and increases the number of hyperparameters that can be searched from 20 to 30 in Amazon SageMaker Automatic Model Tuning

    Release v1.44.54 (2022-07-13)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 3
  • Bump github.com/aws/aws-sdk-go from 1.41.3 to 1.41.4

    Bump github.com/aws/aws-sdk-go from 1.41.3 to 1.41.4

    Bumps github.com/aws/aws-sdk-go from 1.41.3 to 1.41.4.

    Release notes

    Sourced from github.com/aws/aws-sdk-go's releases.

    Release v1.41.4 (2021-10-15)

    Service Client Updates

    • service/elasticfilesystem: Updates service documentation
      • EFS adds documentation for a new exception for short identifiers to be thrown after its migration to long resource identifiers.
    • service/glue: Updates service API and documentation
      • Enable S3 event base crawler API.
    Changelog

    Sourced from github.com/aws/aws-sdk-go's changelog.

    Release v1.41.4 (2021-10-15)

    Service Client Updates

    • service/elasticfilesystem: Updates service documentation
      • EFS adds documentation for a new exception for short identifiers to be thrown after its migration to long resource identifiers.
    • service/glue: Updates service API and documentation
      • Enable S3 event base crawler API.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 3
  • Bump github.com/elastic/go-elasticsearch/v7 from 7.13.0 to 7.13.1

    Bump github.com/elastic/go-elasticsearch/v7 from 7.13.0 to 7.13.1

    Bumps github.com/elastic/go-elasticsearch/v7 from 7.13.0 to 7.13.1.

    Release notes

    Sourced from github.com/elastic/go-elasticsearch/v7's releases.

    7.13.1

    X-Pack

    • New API:
      • SnapshotRepositoryAnalyze
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 3
  • Bump github.com/aws/aws-sdk-go from 1.44.66 to 1.44.70

    Bump github.com/aws/aws-sdk-go from 1.44.66 to 1.44.70

    Bumps github.com/aws/aws-sdk-go from 1.44.66 to 1.44.70.

    Release notes

    Sourced from github.com/aws/aws-sdk-go's releases.

    Release v1.44.70 (2022-08-04)

    Service Client Updates

    • service/chime-sdk-meetings: Updates service API and documentation
    • service/config: Updates service API
    • service/dms: Updates service documentation
      • Documentation updates for Database Migration Service (DMS).
    • service/iot: Updates service API and documentation
      • The release is to support attach a provisioning template to CACert for JITP function, Customer now doesn't have to hardcode a roleArn and templateBody during register a CACert to enable JITP.

    Release v1.44.69 (2022-08-03)

    Service Client Updates

    • service/cognito-idp: Updates service API and documentation
    • service/wafv2: Updates service API and documentation

    Release v1.44.68 (2022-08-02)

    Service Client Updates

    • service/license-manager-user-subscriptions: Adds new service
    • service/personalize: Updates service API and documentation

    Release v1.44.67 (2022-08-01)

    Service Client Updates

    • service/config: Updates service documentation
    • service/workspaces: Updates service API and documentation
      • This release introduces ModifySamlProperties, a new API that allows control of SAML properties associated with a WorkSpaces directory. The DescribeWorkspaceDirectories API will now additionally return SAML properties in its responses.
    Changelog

    Sourced from github.com/aws/aws-sdk-go's changelog.

    Release v1.44.70 (2022-08-04)

    Service Client Updates

    • service/chime-sdk-meetings: Updates service API and documentation
    • service/config: Updates service API
    • service/dms: Updates service documentation
      • Documentation updates for Database Migration Service (DMS).
    • service/iot: Updates service API and documentation
      • The release is to support attach a provisioning template to CACert for JITP function, Customer now doesn't have to hardcode a roleArn and templateBody during register a CACert to enable JITP.

    Release v1.44.69 (2022-08-03)

    Service Client Updates

    • service/cognito-idp: Updates service API and documentation
    • service/wafv2: Updates service API and documentation

    Release v1.44.68 (2022-08-02)

    Service Client Updates

    • service/license-manager-user-subscriptions: Adds new service
    • service/personalize: Updates service API and documentation

    Release v1.44.67 (2022-08-01)

    Service Client Updates

    • service/config: Updates service documentation
    • service/workspaces: Updates service API and documentation
      • This release introduces ModifySamlProperties, a new API that allows control of SAML properties associated with a WorkSpaces directory. The DescribeWorkspaceDirectories API will now additionally return SAML properties in its responses.
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump go.mongodb.org/mongo-driver from 1.10.0 to 1.10.1

    Bump go.mongodb.org/mongo-driver from 1.10.0 to 1.10.1

    Bumps go.mongodb.org/mongo-driver from 1.10.0 to 1.10.1.

    Commits
    • 9c62b3f Update version to v1.10.1
    • 06579a7 GODRIVER-2489 createPipelineOptionsDoc: return err (#1036)
    • bdfc953 update for libmongocrypt 1.5.2 (#1037)
    • 51ecabd GODRIVER-2489 Return error if createPipelineOptionsDoc() fails (#1035)
    • e6f6f26 GODRIVER-2494 Skip StaleShardVersion resume test on 6.1+. (#1030)
    • e095f2d GODRIVER-2495 Undeprecate legacy timeouts. (#1026)
    • 18da11c Update version to v1.10.1-prerelease
    • 5d004cc Update version to v1.11.0-prerelease
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/orlangure/gnomock from 0.20.0 to 0.21.0 in /cmd/cleaner

    Bump github.com/orlangure/gnomock from 0.20.0 to 0.21.0 in /cmd/cleaner

    Bumps github.com/orlangure/gnomock from 0.20.0 to 0.21.0.

    Release notes

    Sourced from github.com/orlangure/gnomock's releases.

    v0.21.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/orlangure/gnomock/compare/v0.20.0...v0.21.0

    Commits
    • 55f19ae Mark presets that support ARM64 in readme
    • 66b8c6c Use community cassandra image instead of bitnami
    • a467ef6 Update dependencies
    • 9c93cf3 Bump github.com/orlangure/gnomock from 0.19.0 to 0.20.0 in /cmd/cleaner
    • bbfd78f Bump github.com/denisenkom/go-mssqldb from 0.12.0 to 0.12.2
    • 24ee3d3 Bump github.com/stretchr/testify from 1.7.1 to 1.7.2
    • 2803c98 Bump github.com/aws/aws-sdk-go from 1.44.6 to 1.44.37
    • 132558f Bump github.com/influxdata/influxdb-client-go/v2 from 2.8.2 to 2.9.0
    • 67872cc Bump github.com/lib/pq from 1.10.5 to 1.10.6
    • 7168090 Bump go.mongodb.org/mongo-driver from 1.9.0 to 1.9.1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bug: Healthcheck failed on running k3s preset example

    Bug: Healthcheck failed on running k3s preset example

    Describe the bug I wanted to try and use the k3s preset as it seemeed very developer friendy, but on running the preset_test.go a healthcheck failed is repeatedly logged, more precisely kubeconfig cannot be found

    To Reproduce To reproduce clone the repo and go test preset_test.go in preset/k3s

    Expected behavior An expected behaviour would be to fetch the kube config succesfullyy

    Screenshots image

    System:

    • OS: MacOS
    • Version 12.3.1
    • Docker desktop version 4.4.2 (engine version 20.10.12)
    opened by jukomericki 3
  • New preset: jaeger, tracing backend

    New preset: jaeger, tracing backend

    https://github.com/jaegertracing/jaeger is a commonly used backend service for https://opentracing.io/ / https://opentelemetry.io/

    https://hub.docker.com/r/jaegertracing/all-in-one/tags is a nice image which needs only one container.

    opened by jayvdb 0
  • feat: network option

    feat: network option

    Context

    gnomock works great when you have to run a couple of independent containers to test your application, but as soon as you require communication between those containers, things get tricky. I've tried a couple of approaches but couldn't manage to make a container communicate with another.

    Solution

    This PR adds a new option gnomock.WithNetwork("network name") that allows a user to define which network the containers should run on. This allows communication between containers using the container name as its hostname.

    Example

    dbContainerName := "db"
    _, err := gnomock.Start(
        postgresPreset,
        gnomock.WithNetwork("example"),
        gnomock.WithContainerName(dbContainerName),
    )
    
    _, err := gnomock,StartCustom(
        "custom/my-api",
        gnomock.DefaultTCP(80),
        gnomock.WithEnv(fmt.Sprintf("DATABASE_HOST=%s", dbContainerName)),
        gnomock.WithNetwork("example"),
    )
    

    How it works

    If options.Network is provided, check if there is an existing network with that name, if yes, use the existing network. Otherwise, create a new one and use it.

    opened by mathnogueira 4
Releases(v0.21.0)
  • v0.21.0(Jun 24, 2022)

    What's Changed

    • Setup postgres service container in CI by @orlangure in https://github.com/orlangure/gnomock/pull/502
    • server.md: Remove comment from example by @jayvdb in https://github.com/orlangure/gnomock/pull/539
    • Use a working mysql image on arm64 arch by @orlangure in https://github.com/orlangure/gnomock/pull/569
    • Update dependencies by @orlangure in https://github.com/orlangure/gnomock/pull/577
    • Fix Cassandra preset on arm64 + mark supported arm64 presets in readme by @orlangure in https://github.com/orlangure/gnomock/pull/579

    New Contributors

    • @jayvdb made their first contribution in https://github.com/orlangure/gnomock/pull/539

    Full Changelog: https://github.com/orlangure/gnomock/compare/v0.20.0...v0.21.0

    Source code(tar.gz)
    Source code(zip)
  • v0.20.0(May 4, 2022)

    What's Changed

    • Build multiplatform docker images (taskfile) by @orlangure in https://github.com/orlangure/gnomock/pull/440
    • Make 0.14.0 default localstack version by @orlangure in https://github.com/orlangure/gnomock/pull/451
    • Use Go 1.18 in cleaner and update dependencies by @orlangure in https://github.com/orlangure/gnomock/pull/500
    • Support explicit port mappings in remote mode by @orlangure in https://github.com/orlangure/gnomock/pull/449 Full Changelog: https://github.com/orlangure/gnomock/compare/v0.19.0...v0.20.0
    Source code(tar.gz)
    Source code(zip)
  • v0.19.0(Dec 17, 2021)

    What's Changed

    • Bump github.com/docker/docker from 20.10.10+incompatible to 20.10.11+incompatible by @dependabot in https://github.com/orlangure/gnomock/pull/362
    • Bump github.com/segmentio/kafka-go from 0.4.23 to 0.4.25 by @dependabot in https://github.com/orlangure/gnomock/pull/367
    • Bump go.mongodb.org/mongo-driver from 1.7.4 to 1.8.0 by @dependabot in https://github.com/orlangure/gnomock/pull/368
    • Update dependency versions by @orlangure in https://github.com/orlangure/gnomock/pull/370
    • Bump github.com/influxdata/influxdb-client-go/v2 from 2.5.1 to 2.6.0 by @dependabot in https://github.com/orlangure/gnomock/pull/371
    • Bump github.com/elastic/go-elasticsearch/v7 from 7.15.1 to 7.16.0 by @dependabot in https://github.com/orlangure/gnomock/pull/381
    • Bump go.mongodb.org/mongo-driver from 1.8.0 to 1.8.1 by @dependabot in https://github.com/orlangure/gnomock/pull/384
    • Bump github.com/docker/docker from 20.10.11+incompatible to 20.10.12+incompatible by @dependabot in https://github.com/orlangure/gnomock/pull/385
    • Update dependency/CI environment versions by @orlangure in https://github.com/orlangure/gnomock/pull/390
    • Make 0.13.1 the default version of localstack by @orlangure in https://github.com/orlangure/gnomock/pull/391
    • Release sdk 1.19.0 by @orlangure in https://github.com/orlangure/gnomock/pull/392

    Full Changelog: https://github.com/orlangure/gnomock/compare/v0.18.2...v0.19.0

    Source code(tar.gz)
    Source code(zip)
  • v0.18.2(Nov 12, 2021)

    What's Changed

    • Make protocol comparison case insensitive by @orlangure in https://github.com/orlangure/gnomock/pull/355
    • Dependency updates

    Full Changelog: https://github.com/orlangure/gnomock/compare/v0.18.1...v0.18.2

    Source code(tar.gz)
    Source code(zip)
  • v0.18.1(Oct 30, 2021)

    This is a maintenance release that includes internal refactoring and version updates, including a security update of containerd package.

    What's Changed

    • refactor: move from io/ioutil to io and os package by @Juneezee in https://github.com/orlangure/gnomock/pull/326
    • Update dependency versions

    New Contributors

    • @Juneezee made their first contribution in https://github.com/orlangure/gnomock/pull/326

    Full Changelog: https://github.com/orlangure/gnomock/compare/v0.18.0...v0.18.1

    Source code(tar.gz)
    Source code(zip)
  • v0.18.0(Sep 30, 2021)

  • v0.17.0(Sep 26, 2021)

  • v0.16.0(Aug 20, 2021)

  • v0.15.2(Aug 7, 2021)

  • v0.15.1(Jul 1, 2021)

  • v0.15.0(Jun 19, 2021)

  • v0.14.2(May 19, 2021)

  • v0.14.1(May 1, 2021)

  • v0.14.0(Apr 26, 2021)

  • v0.13.0(Apr 14, 2021)

  • v0.12.1(Mar 26, 2021)

    This release includes 2 bug fixes that appeared after a recent docker update on mac and windows:

    • Sometimes new containers were assigned port "0"
    • Gnomock couldn't communicate with docker host from inside its own container (not relevant for direct Go users)
    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Jan 30, 2021)

    • CockroachDB preset
    • Elasticsearch preset memory tweak: set 256m heap size inside the container
    • container cleanup improvements for Gnomock Server
    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Jan 14, 2021)

    Container cleanup mechanism: each container started by Gnomock gets its own sidecar container, which is responsible to terminate the container in case the tests for some reason don't run gnomock.Stop().

    Source code(tar.gz)
    Source code(zip)
  • v0.10.1(Dec 9, 2020)

    This is a stability release.

    • A minor issue is fixed when using default address/port on containers that don't have it defined.
    • Preset documentation improved to include default images or credentials.
    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Oct 21, 2020)

    Potentially breaking change in this release: Some public types and packages were moved into internal package. Nobody was supposed to use these packages or otherwise depend on them, so all should be good. Please let me know if not.

    • Implement RabbitMQ messages import (https://github.com/orlangure/gnomock/pull/66 by @dusansimic)
    • Implement lightweight Kubernetes (k3s) preset
    • Build improvement (https://github.com/orlangure/gnomock/pull/75 by @u5surf) and other internal changes
    Source code(tar.gz)
    Source code(zip)
  • v0.9.5(Oct 6, 2020)

  • v0.9.4(Sep 19, 2020)

  • v0.9.3(Aug 8, 2020)

  • v0.9.2(Jul 20, 2020)

  • v0.9.1(Jul 10, 2020)

  • v0.9.0(Jun 19, 2020)

    This release introduces some breaking changes.

    326b160 Support multiple queries files 1641bf2 Implement debug mode 707b724 Move preset image tag to each preset dcfde03 Merge timeouts into a single timeout dfbb99d Stop failed containers immediately

    and other changes...

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(May 23, 2020)

    • Breaking change: all presets moved into the main repository under the main gnomock package.
    • HTTP wrapper merged into the same repo as well.
    • New higher default timeout values.
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(May 8, 2020)

Owner
Yury Fedorov
Software Developer
Yury Fedorov
Just Dance Unlimited mock-up server written on Golang and uses a popular Gin framework for Go.

BDCS Just Dance Unlimited mock-up server written on Golang and uses a popular Gin framework for Go. Features Security Authorization works using UbiSer

Mikhail 0 Nov 10, 2021
A toolkit with common assertions and mocks that plays nicely with the standard library

Testify - Thou Shalt Write Tests ℹ️ We are working on testify v2 and would love to hear what you'd like to see in it, have your say here: https://cutt

Stretchr, Inc. 17.2k Aug 1, 2022
Configuration management tool inspired by Ansible, but with no yaml - just Go

GOSSH This repo is an experiement with creating a declarative IT automation and configuration management package for Golang. Think Ansible, but no Yam

Kristoffer Lorentsen 21 Jul 27, 2022
Test your command line interfaces on windows, linux and osx and nodes viá ssh and docker

Commander Define language independent tests for your command line scripts and programs in simple yaml files. It runs on windows, osx and linux It can

null 202 Jul 3, 2022
HTTP mocking to test API services for chaos scenarios

GAOS HTTP mocking to test API services for chaos scenarios Gaos, can create and provide custom mock restful services via using your fully-customizable

Trendyol Open Source 209 May 24, 2022
Ritchie CLI is an open-source tool that allows to create, store and share any kind of automation, executing them through command lines, to run operations or start workflows ⚙️ 🖥 💡

Table of contents 1. About 2. Getting Started i. Installation ii. Initialize rit locally iii. Add your first formulas repository iv. Run the Hello Wor

ZUP IT INNOVATION 555 Jul 27, 2022
go-test-trace is like go test but it also generates distributed traces.

go-test-trace go-test-trace is like go test but it also generates distributed traces. Generated traces are exported in OTLP to a OpenTelemetry collect

JBD 373 Jun 24, 2022
Flugel Test Documentation for steps to run and test the automatio

Flugel Test Documentation Documentation for steps to run and test the automation #Test-01 1 - Local Test Using Terratest (End To End) 1- By runing " t

Suc0_Unix 0 Dec 30, 2021
Test-assignment - Test assignment with golang

test-assignment We have a two steam of data and we need to save it in the map: I

null 0 Jan 19, 2022
This repository includes consumer driven contract test for provider, unit test and counter api.

This repository includes consumer driven contract test for provider, unit test and counter api.

Ahmet Zümberoğlu 0 Feb 1, 2022
Create your own mock server with just a JSON file!

Gmocker Run a blazing fast mock server in just seconds! ?? All you need is to make a json file that contains path and response mapping. See an example

Ananto 51 Jul 25, 2022
Create your own blazing fast mock server with just a JSON file!

Gmocker Run a blazing fast mock server in just seconds! ?? All you need is to make a json file that contains path and response mapping. See an example

Ananto 51 Jul 25, 2022
Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.

Selenoid Selenoid is a powerful implementation of Selenium hub using Docker containers to launch browsers. Features One-command Installation Start bro

Aerokube 2.2k Aug 4, 2022
Automatically generate Go test boilerplate from your source code.

gotests gotests makes writing Go tests easy. It's a Golang commandline tool that generates table driven tests based on its target source files' functi

Charles Weill 4.1k Aug 4, 2022
Rest API to receive solana tokens in testnet just like a faucet

solana-example Rest API to receive solana tokens in testnet just like a faucet Running go run main.go Test Request airdrop curl --header "Content-Type

Rafael Escrich 0 Oct 14, 2021
This is just a repository to play around with Generics and Fuzzing, two big things coming with go 1.18!

This is just a repository to play around with Generics and Fuzzing, two big things coming with go 1.18!

Christopher Smith 0 Feb 6, 2022
Testing framework for Go. Allows writing self-documenting tests/specifications, and executes them concurrently and safely isolated. [UNMAINTAINED]

GoSpec GoSpec is a BDD-style testing framework for the Go programming language. It allows writing self-documenting tests/specs, and executes them in p

Esko Luontola 112 Apr 5, 2022
Generate a test coverage badge like this one for your go projects.

coverage-badge-go ?? Generate a test coverage badge like this one for your go projects. Usage on: pull_request: branches: -

tj-actions 20 Jul 31, 2022
Cloud Spanner load generator to load test your application and pre-warm the database before launch

GCSB GCSB Quickstart Create a test table Load data into table Run a load test Operations Load Single table load Multiple table load Loading into inter

Cloud Spanner Ecosystem 21 Jul 13, 2022