Behaviour Driven Development tests generator for Golang

gherkingen

Version Build Status Go Report Card Coverage Status

It's a Behaviour Driven Development (BDD) tests generator for Golang.

Golang logo

It accept a *.feature Cucumber/Gherkin file and generates a test boilerplate. All that remains is to change the tests a little.

The generator is very customizable, it is possible to customize an output for any golang testing framework or even for another language.

What is for?

Simple example

Given feature [reference]:

Feature: Application command line tool
  Scenario: User wants to see usage information
    When <flag> is provided
    Then usage should be printed
    Examples:
    | <flag> |
    | --help |
    | -help  |

Then this generator writes a golang output:

func TestApplicationCommandLineTool(t *testing.T) {
	f := bdd.NewFeature(t, "Application command line tool")

	f.Scenario("User wants to see usage information", func(t *testing.T, f *bdd.Feature) {
		type testCase struct {
			flag string
		}

		testCases := map[string]testCase{
			"--help": {"--help"},
			"-help":  {"-help"},
		}

		for name, tc := range testCases {
			name, tc := name, tc

			t.Run(name, func(t *testing.T) {
				t.Logf("TestCase: %+v", tc)
				f.When("<flag> is provided", func() {

				})
				f.Then("usage should be printed", func() {

				})
			})
		}
	})
}

More advanced example

See internal/app/app.feature and internal/app/app_test.go.

Install

Run:

go install github.com/hedhyw/gherkingen/cmd/gherkingen@latest

Usage

Simple usage

For generating test output, simply run:

gherkingen EXAMPLE.feature

More advanced usage

Generating test output with custom options

gherkingen \
    -format go \
    -template my_template.tmpl \
    EXAMPLE.feature

Listing internal templates

gherkingen -list

Help

gherkingen --help

Usage of gherkingen [FEATURE_FILE]:
  -format string
        output format: json, go, raw (default "go")
  -help
        print usage
  -list
        list internal templates
  -template string
        template file (default "@/std.struct.go.tmpl")

Output customization

Custom templates

You can provide your own template, it can be based on internal/assets/std.args.go.tmpl. In the command-line tool specify the template using -template flag: gherkingen -template example.tmpl raw example.feature

Frameworks support

It is possible to integrate the generator with any BDD-testing fraemwork. Feel free to create a pull request for supporting templates for them. For this:

  1. Create a template internal/assets/SOME_NAME.go.tmpl.
  2. Add it to the test TestOpenTemplate in the file internal/assets/assets_test.go.
  3. Check: make lint test.
  4. Commit&Push, create a PR.

Language support

Templates are very customizable, so you can even generate non-golang code. In the command-line tool specify raw format using -format flag and your template using -template flag: gherkingen -format raw -template example.tmpl example.feature.

License

See License.

Comments
  • Template object documentation

    Template object documentation

    Now the application can return JSON representation of template object if flag -format is set to json, but it will be nicer if the object will be documented.

  • JS support problem

    JS support problem

    This is a great library, I would like to use it in my projects. But I think it has a bug, it doesnt really support JS. It should also be able to generate code in JS with Jest or Mocha, maybe both, depending on given parameters. And publish it on npm, it's a lot easier to install libraries from there. Please fix it ASAP, thanks!

  • gha: bump goreleaser/goreleaser-action from 3 to 4

    gha: bump goreleaser/goreleaser-action from 3 to 4

    Bumps goreleaser/goreleaser-action from 3 to 4.

    Release notes

    Sourced from goreleaser/goreleaser-action's releases.

    v4.0.0

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v3...v4.0.0

    v3.2.0

    What's Changed

    • chore: remove workaround for setOutput by @​crazy-max (#374)
    • chore(deps): bump @​actions/core from 1.9.1 to 1.10.0 (#372)
    • chore(deps): bump yargs from 17.5.1 to 17.6.0 (#373)

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v3.1.0...v3.2.0

    v3.1.0

    What's Changed

    • fix: dist resolution from config file by @​crazy-max (#369)
    • ci: fix workflow by @​crazy-max (#357)
    • docs: bump actions to latest major by @​crazy-max (#356)
    • chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5 (#360)
    • chore(deps): bump ghaction-import-gpg to v5 (#359)
    • chore(deps): bump @​actions/core from 1.6.0 to 1.8.2 (#358)
    • chore(deps): bump @​actions/core from 1.8.2 to 1.9.1 (#367)

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v3.0.0...v3.1.0

    Commits
    • 8f67e59 chore: regenerate
    • 78df308 chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#383)
    • 66134d9 Merge remote-tracking branch 'origin/master' into flarco/master
    • 3c08cfd chore(deps): bump yargs from 17.6.0 to 17.6.2
    • 5dc579b docs: add example when using workdir along with upload-artifact (#366)
    • 3b7d1ba feat!: remove auto-snapshot on dirty tag (#382)
    • 23e0ed5 fix: do not override GORELEASER_CURRENT_TAG (#370)
    • 1315dab update build
    • b60ea88 improve install
    • 4d25ab4 Update goreleaser.ts
    • 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)
  • gomod: bump github.com/hedhyw/semerr from 0.5.0 to 0.5.1

    gomod: bump github.com/hedhyw/semerr from 0.5.0 to 0.5.1

    Bumps github.com/hedhyw/semerr from 0.5.0 to 0.5.1.

    Release notes

    Sourced from github.com/hedhyw/semerr's releases.

    v0.5.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/hedhyw/semerr/compare/v0.5.0...v0.5.1

    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)
  • gha: bump goreleaser/goreleaser-action from 2 to 3

    gha: bump goreleaser/goreleaser-action from 2 to 3

    Bumps goreleaser/goreleaser-action from 2 to 3.

    Release notes

    Sourced from goreleaser/goreleaser-action's releases.

    v3.0.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2.9.1...v3.0.0

    v2.9.1

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2...v2.9.1

    v2.9.0

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2.8.1...v2.9.0

    v2.8.1

    What's Changed

    Full Changelog: https://github.com/goreleaser/goreleaser-action/compare/v2.8.0...v2.8.1

    v2.8.0

    What's Changed

    ... (truncated)

    Commits
    • b508e2e chore: remove workaround for setOutput (#374)
    • 0ca84fc chore(deps): bump yargs from 17.5.1 to 17.6.0 (#373)
    • 685a991 chore(deps): bump @​actions/core from 1.9.1 to 1.10.0 (#372)
    • ff11ca2 fix: dist resolution from config file (#369)
    • ef54bd4 chore(deps): bump @​actions/core from 1.8.2 to 1.9.1 (#367)
    • aab65f3 chore(deps): bump @​actions/core from 1.6.0 to 1.8.2 (#358)
    • 7bb9301 chore(deps): bump ghaction-import-gpg to v5 (#359)
    • 50f10b3 chore(deps): bump crazy-max/ghaction-import-gpg from 4 to 5 (#360)
    • 188063d ci: fix workflow (#357)
    • 7e270cc docs: bump actions to latest major (#356)
    • 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)
  • gha: bump docker/setup-qemu-action from 1 to 2

    gha: bump docker/setup-qemu-action from 1 to 2

    Bumps docker/setup-qemu-action from 1 to 2.

    Release notes

    Sourced from docker/setup-qemu-action's releases.

    v2.0.0

    • Node 16 as default runtime by @​crazy-max (#48)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.
    • chore: update dev dependencies and workflow by @​crazy-max (#43 #47)
    • Bump @​actions/core from 1.3.0 to 1.6.0 (#37 #39 #41)
    • Bump @​actions/exec from 1.0.4 to 1.1.1 (#38 #46)

    Full Changelog: https://github.com/docker/setup-qemu-action/compare/v1.2.0...v2.0.0

    v1.2.0

    • Display image information (#36)
    • Bump @​actions/core from 1.2.7 to 1.3.0 (#35)

    v1.1.0

    • Remove os limitation (#30)
    • Bump @​actions/core from 1.2.6 to 1.2.7 (#29)

    v1.0.2

    • Enhance workflow (#26)
    • Container based developer flow (#19 #20)

    v1.0.1

    • Fix CVE-2020-15228
    Commits
    • e81a89b Merge pull request #63 from crazy-max/setOutput
    • 2d3efc7 Remove workaround for setOutput
    • bfc44ea Merge pull request #62 from crazy-max/context
    • 25725d8 Use context for inputs
    • 8c1e35a Merge pull request #61 from crazy-max/exec-output
    • f3c51a3 update README
    • c47ad32 Use built-in getExecOutput
    • aa08745 Merge pull request #59 from docker/dependabot/npm_and_yarn/actions/core-1.10.0
    • 9443994 Update generated content
    • 81a47e1 Bump @​actions/core from 1.9.1 to 1.10.0
    • 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)
  • gha: bump actions/setup-go from 2 to 3

    gha: bump actions/setup-go from 2 to 3

    Bumps actions/setup-go from 2 to 3.

    Release notes

    Sourced from actions/setup-go's releases.

    Update actions/cache version to 3.0.0

    In scope of this release we updated actions/cache package as the new version contains fixes for caching error handling

    v3.0.0

    What's Changed

    Breaking Changes

    With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

    This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v3
        with:
          go-version: '1.18.0-rc.1' 
      - run: go version
    

    Add check-latest input

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v2
        with:
          go-version: '1.16'
          check-latest: true
      - run: go version
    

    Moreover, we updated @actions/core from 1.2.6 to 1.6.0

    v2.1.5

    In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

    v2.1.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

    v2.1.3

    • Updated communication with runner to use environment files rather then workflow commands

    ... (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)
  • gha: bump docker/build-push-action from 2 to 3

    gha: bump docker/build-push-action from 2 to 3

    Bumps docker/build-push-action from 2 to 3.

    Release notes

    Sourced from docker/build-push-action's releases.

    v3.0.0

    • Node 16 as default runtime by @​crazy-max (#564)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.
    • Standalone mode support by @​crazy-max (#601 #609)
    • chore: update dev dependencies and workflow by @​crazy-max (#571)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#573)
    • Bump @​actions/github from 5.0.0 to 5.0.1 (#582)
    • Bump minimist from 1.2.5 to 1.2.6 (#584)
    • Bump semver from 7.3.5 to 7.3.7 (#595)
    • Bump csv-parse from 4.16.3 to 5.0.4 (#533)

    Full Changelog: https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0

    v2.10.0

    • Add imageid output and use metadata to set digest output (#569)
    • Add build-contexts input (#563)
    • Enhance outputs display (#559)

    v2.9.0

    • add-hosts input (#553 #555)
    • Fix git context subdir example and improve README (#552)
    • Add e2e tests for ACR (#548)
    • Add description on github-token option to README (#544)
    • Bump node-fetch from 2.6.1 to 2.6.7 (#549)

    v2.8.0

    • Allow specifying subdirectory with default git context (#531)
    • Add cgroup-parent, shm-size, ulimit inputs (#501)
    • Don't set outputs if empty or nil (#470)
    • docs: example to sanitize tags with metadata-action (#476)
    • docs: wrong syntax to sanitize repo slug (#475)
    • docs: test before pushing your image (#455)
    • readme: remove v1 section (#500)
    • ci: virtual env file system info (#510)
    • dev: update workflow (#499)
    • Bump @​actions/core from 1.5.0 to 1.6.0 (#160)
    • Bump ansi-regex from 5.0.0 to 5.0.1 (#469)
    • Bump tmpl from 1.0.4 to 1.0.5 (#465)
    • Bump csv-parse from 4.16.0 to 4.16.3 (#451 #459)

    v2.7.0

    • Add metadata output (#412)
    • Bump @​actions/core from 1.4.0 to 1.5.0 (#439)
    • Add note to sanitize tags (#426)
    • Cache backend API docs (#406)
    • Git context now supports subdir (#407)
    • Bump codecov/codecov-action from 1 to 2 (#415)

    v2.6.1

    • Small typo and ensure trimmed output (#400)

    ... (truncated)

    Commits
    • c56af95 Merge pull request #704 from crazy-max/setOutput
    • 75aaa63 Remove workaround for setOutput
    • f97d6e2 Merge pull request #700 from crazy-max/update-docs
    • 47c00d7 ci: secret job to check for invalid secrets
    • 871b930 docs: update links and layout
    • 105bf59 docs: copy between registries with buildx
    • 48888e0 Merge pull request #699 from crazy-max/docs-outputs
    • 6b820ad docs: note about multiple outputs
    • e1a1035 Merge pull request #665 from baibaratsky/patch-1
    • 0f5a7d4 docs: named contexts
    • 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)
  • gha: bump docker/setup-buildx-action from 1 to 2

    gha: bump docker/setup-buildx-action from 1 to 2

    Bumps docker/setup-buildx-action from 1 to 2.

    Release notes

    Sourced from docker/setup-buildx-action's releases.

    v2.0.0

    • Node 16 as default runtime by @​crazy-max (#131)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.

    Full Changelog: https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0

    v1.7.0

    • Standalone mode by @​crazy-max in (#119)
    • Update dev dependencies and workflow by @​crazy-max (#114 #130)
    • Bump tmpl from 1.0.4 to 1.0.5 (#108)
    • Bump ansi-regex from 5.0.0 to 5.0.1 (#109)
    • Bump @​actions/core from 1.5.0 to 1.6.0 (#110)
    • Bump actions/checkout from 2 to 3 (#126)
    • Bump @​actions/tool-cache from 1.7.1 to 1.7.2 (#128)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#129)
    • Bump minimist from 1.2.5 to 1.2.6 (#132)
    • Bump codecov/codecov-action from 2 to 3 (#133)
    • Bump semver from 7.3.5 to 7.3.7 (#136)

    v1.6.0

    • Add config-inline input (#106)
    • Bump @​actions/core from 1.4.0 to 1.5.0 (#104)
    • Bump codecov/codecov-action from 1 to 2 (#101)

    v1.5.1

    • Explicit version spec for caching (#100)

    v1.5.0

    • Allow building buildx from source (#99)

    v1.4.1

    • Fix docker: invalid reference format (#97)

    v1.4.0

    • Update dev deps (#95)
    • Use built-in getExecOutput (#94)
    • Use core.getBooleanInput (#93)
    • Bump @​actions/exec from 1.0.4 to 1.1.0 (#85)
    • Bump y18n from 4.0.0 to 4.0.3 (#91)
    • Bump hosted-git-info from 2.8.8 to 2.8.9 (#89)
    • Bump ws from 7.3.1 to 7.5.0 (#90)
    • Bump @​actions/tool-cache from 1.6.1 to 1.7.1 (#82 #86)
    • Bump @​actions/core from 1.2.7 to 1.4.0 (#80 #87)

    v1.3.0

    • Display BuildKit version (#72)

    v1.2.0

    • Remove os limitation (#71)
    • Add test job for config input (#68)

    ... (truncated)

    Commits
    • 8c0edbc Merge pull request #175 from crazy-max/input-list-quotes
    • 1fb9cbd escape surrounding quotes for platforms input
    • 693fdd6 Merge pull request #174 from crazy-max/input-quote
    • fe4c1ac preserve quotes surrounding fields in input list
    • c74574e Merge pull request #172 from docker/dependabot/npm_and_yarn/csv-parse-5.3.1
    • 2d0cf98 update generated content
    • 5f1d4ea Bump csv-parse from 5.3.0 to 5.3.1
    • 59b5ed6 Merge pull request #165 from crazy-max/append
    • bd61d52 update generated content
    • f6efb5f platforms input
    • 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)
  • gha: bump actions/checkout from 2 to 3

    gha: bump actions/checkout from 2 to 3

    Bumps actions/checkout from 2 to 3.

    Release notes

    Sourced from actions/checkout's releases.

    v3.0.0

    • Updated to the node16 runtime by default
      • This requires a minimum Actions Runner version of v2.285.0 to run, which is by default available in GHES 3.4 or later.

    v2.5.0

    What's Changed

    Full Changelog: https://github.com/actions/checkout/compare/v2...v2.5.0

    v2.4.2

    What's Changed

    Full Changelog: https://github.com/actions/checkout/compare/v2...v2.4.2

    v2.4.1

    • Fixed an issue where checkout failed to run in container jobs due to the new git setting safe.directory

    v2.4.0

    • Convert SSH URLs like org-<ORG_ID>@github.com: to https://github.com/ - pr

    v2.3.5

    Update dependencies

    v2.3.4

    v2.3.3

    v2.3.2

    Add Third Party License Information to Dist Files

    v2.3.1

    Fix default branch resolution for .wiki and when using SSH

    v2.3.0

    Fallback to the default branch

    v2.2.0

    Fetch all history for all tags and branches when fetch-depth=0

    v2.1.1

    Changes to support GHES (here and here)

    ... (truncated)

    Changelog

    Sourced from actions/checkout's changelog.

    Changelog

    v3.1.0

    v3.0.2

    v3.0.1

    v3.0.0

    v2.3.1

    v2.3.0

    v2.2.0

    v2.1.1

    • Changes to support GHES (here and here)

    v2.1.0

    v2.0.0

    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)
  • gha: bump docker/login-action from 1 to 2

    gha: bump docker/login-action from 1 to 2

    Bumps docker/login-action from 1 to 2.

    Release notes

    Sourced from docker/login-action's releases.

    v2.0.0

    • Node 16 as default runtime by @​crazy-max (#161)
      • This requires a minimum Actions Runner version of v2.285.0, which is by default available in GHES 3.4 or later.
    • chore: update dev dependencies and workflow by @​crazy-max (#170)
    • Bump @​actions/exec from 1.1.0 to 1.1.1 (#167)
    • Bump @​actions/io from 1.1.1 to 1.1.2 (#168)
    • Bump minimist from 1.2.5 to 1.2.6 (#176)
    • Bump https-proxy-agent from 5.0.0 to 5.0.1 (#182)

    Full Changelog: https://github.com/docker/login-action/compare/v1.14.1...v2.0.0

    v1.14.1

    • Revert to Node 12 as default runtime to fix issue for GHE users (#160)

    v1.14.0

    • Update to node 16 (#158)
    • Bump @​aws-sdk/client-ecr from 3.45.0 to 3.53.0 (#157)
    • Bump @​aws-sdk/client-ecr-public from 3.45.0 to 3.53.0 (#156)

    v1.13.0

    • Handle proxy settings for aws-sdk (#152)
    • Workload identity based authentication docs for GCR and GAR (#112)
    • Test login against ACR (#49)
    • Bump @​aws-sdk/client-ecr from 3.44.0 to 3.45.0 (#132)
    • Bump @​aws-sdk/client-ecr-public from 3.43.0 to 3.45.0 (#131)

    v1.12.0

    • ECR: only set credentials if username and password are specified (#128)
    • Refactor to use aws-sdk v3 (#128)

    v1.11.0

    • ECR: switch implementation to use the AWS SDK (#126)
    • ecr input to specify whether the given registry is ECR (#123)
    • Test against Windows runner (#126)
    • Update instructions for Google registry (#127)
    • Update dev workflow (#111)
    • Small changes for GHCR doc (#86)
    • Update dev dependencies (#85)
    • Bump ansi-regex from 5.0.0 to 5.0.1 (#101)
    • Bump tmpl from 1.0.4 to 1.0.5 (#100)
    • Bump @​actions/core from 1.4.0 to 1.6.0 (#94 #103)
    • Bump codecov/codecov-action from 1 to 2 (#88)
    • Bump hosted-git-info from 2.8.8 to 2.8.9 (#83)
    • Bump node-notifier from 8.0.0 to 8.0.2 (#82)
    • Bump ws from 7.3.1 to 7.5.0 (#81)
    • Bump lodash from 4.17.20 to 4.17.21 (#80)
    • Bump y18n from 4.0.0 to 4.0.3 (#79)

    v1.10.0

    • GitHub Packages Docker Registry deprecated (#78)

    ... (truncated)

    Commits
    • f4ef78c Merge pull request #299 from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...
    • 9ad4ce3 Update generated content
    • 884eadd Bump @​aws-sdk/client-ecr-public from 3.53.0 to 3.186.0
    • a266232 Merge pull request #298 from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...
    • f97efcf Update generated content
    • 5ae789b Bump @​aws-sdk/client-ecr from 3.53.0 to 3.186.0
    • 71c23b5 Merge pull request #292 from docker/dependabot/npm_and_yarn/actions/core-1.10.0
    • 6401d70 Update generated content
    • 67e8909 Bump @​actions/core from 1.9.1 to 1.10.0
    • 21f251a Merge pull request #275 from crazy-max/redact-aws-creds
    • 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)
Learn Go with test-driven development
Learn Go with test-driven development

Learn Go with Tests Art by Denise Formats Gitbook EPUB or PDF Translations 中文 Português 日本語 한국어 Support me I am proud to offer this resource for free,

Jan 1, 2023
Extremely flexible golang deep comparison, extends the go testing package and tests HTTP APIs
Extremely flexible golang deep comparison, extends the go testing package and tests HTTP APIs

go-testdeep Extremely flexible golang deep comparison, extends the go testing package. Latest news Synopsis Description Installation Functions Availab

Dec 22, 2022
Golang application focused on tests
Golang application focused on tests

Maceio Golang application that listens for webhook events coming from Github, runs tests previously defined in a configuration file and returns the ou

Sep 8, 2021
S3 etag tests for golang

S3-etag-tests Quickstart Run docker-compose up. Execute tests in /test with $ go

Dec 16, 2021
Simple test driven approach in "GOLANG"
Simple test driven approach in

Testing in GOLANG Usage Only test go test -v Coverage go test -cover or go test -coverprofile=coverage.out go tool cover -html=coverage.out Benchmark

Dec 5, 2021
A yaml data-driven testing format together with golang testing library

Specimen Yaml-based data-driven testing Specimen is a yaml data format for data-driven testing. This enforces separation between feature being tested

Nov 24, 2022
Package for comparing Go values in tests

Package for equality of Go values This package is intended to be a more powerful and safer alternative to reflect.DeepEqual for comparing whether two

Dec 29, 2022
Record and replay your HTTP interactions for fast, deterministic and accurate tests

go-vcr go-vcr simplifies testing by recording your HTTP interactions and replaying them in future runs in order to provide fast, deterministic and acc

Dec 25, 2022
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.

GoConvey is awesome Go testing Welcome to GoConvey, a yummy Go testing tool for gophers. Works with go test. Use it in the terminal or browser accordi

Dec 30, 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

Nov 28, 2022
Ruby on Rails like test fixtures for Go. Write tests against a real database

testfixtures Warning: this package will wipe the database data before loading the fixtures! It is supposed to be used on a test database. Please, doub

Jan 8, 2023
Automatically update your Go tests

autogold - automatically update your Go tests autogold makes go test -update automatically update your Go tests (golden files and Go values in e.g. fo

Dec 25, 2022
A simple `fs.FS` implementation to be used inside tests.

testfs A simple fs.FS which is contained in a test (using testing.TB's TempDir()) and with a few helper methods. PS: This lib only works on Go 1.16+.

Mar 3, 2022
A next-generation testing tool. Orion provides a powerful DSL to write and automate your acceptance tests

Orion is born to change the way we implement our acceptance tests. It takes advantage of HCL from Hashicorp t o provide a simple DSL to write the acceptance tests.

Aug 31, 2022
Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.

Terratest is a Go library that makes it easier to write automated tests for your infrastructure code. It provides a variety of helper functions and patterns for common infrastructure testing tasks,

Dec 30, 2022
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.
Go testing in the browser. Integrates with `go test`. Write behavioral tests in Go.

GoConvey is awesome Go testing Welcome to GoConvey, a yummy Go testing tool for gophers. Works with go test. Use it in the terminal or browser accordi

Dec 30, 2022
gostub is a library to make stubbing in unit tests easy

gostub gostub is a library to make stubbing in unit tests easy. Getting started Import the following package: github.com/prashantv/gostub Click here t

Dec 28, 2022
Robust framework for running complex workload scenarios in isolation, using Go; for integration, e2e tests, benchmarks and more! 💪

e2e Go Module providing robust framework for running complex workload scenarios in isolation, using Go and Docker. For integration, e2e tests, benchma

Jan 5, 2023
gomonkey is a library to make monkey patching in unit tests easy

gomonkey is a library to make monkey patching in unit tests easy, and the core idea of monkey patching comes from Bouke, you can read this blogpost for an explanation on how it works.

Jan 4, 2023