gomodfuzz

module
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2019 License: MPL-2.0

README

gomodfuzz GoDoc Go Report Card Build Status

gomodfuzz is a program which assists testing of Go program compatibility with 1.11+ module support.

It runs the input program with permutations of GO111MODULE, GOFLAGS, GOPATH, and working directory traits (GOMOD, under GOPATH, etc.).

Use Case

Testing programs which rely on parts of the Go toolchain such as golang.org/x/tools/go/packages to load packages.

It was originally made to assert that aws-mockery could load packages from as many file location scenarios as possible.

Permutation values

  • working directory's is inside a module's file tree (WD in the output)
    • true
    • false
  • working directory's relationship to GOPATH (IN_MODULE in the output)
    • inside GOPATH
    • outside GOPATH
  • GO111MODULE
    • auto
    • off
    • on
  • GOFLAGS
    • empty
    • -mod=vendor
  • GOPATH
    • empty
    • a path which will contain the working directory if the "working directory's relationship to GOPATH" permutation value is "inside GOPATH"
    • a path which will never contain the working directory

Usage

To install: go get -v github.com/codeactual/gomodfuzz/cmd/gomodfuzz

Examples

Usage:

gomodfuzz --help

Basic test:

gomodfuzz -- /path/to/subject --subject_flag0  --subject_flag1 subject_arg0 subject_arg1

Run subject command with a timeout of 10 seconds:

gomodfuzz --timeout 10 -- /path/to/subject

Display verbose results (passes, full errors, etc.)

gomodfuzz -v -- /path/to/subject

License

Mozilla Public License Version 2.0 (About, FAQ)

(Exported from a private monorepo with transplant.)

Directories

Path Synopsis
cmd
gomodfuzz
Command gomodfuzz assists testing of Go program compatability with 1.11+ module support.
Command gomodfuzz assists testing of Go program compatability with 1.11+ module support.
internal
cage/cmd/testecho
Package testecho assists execution of the CLI from test cases and assertion of its result.
Package testecho assists execution of the CLI from test cases and assertion of its result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL