Skip to content

Commit

Permalink
Add Fuzzit integration
Browse files Browse the repository at this point in the history
Add a basic fuzz test for the httprule package, run regression tests
locally on every PR and continuous fuzzing on fuzzit.dev.
  • Loading branch information
dominikh authored and Yevgeny Pats committed Aug 20, 2019
1 parent fd2d159 commit 8e0dde8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Expand Up @@ -48,6 +48,14 @@ jobs:
- checkout
- run: go get golang.org/x/lint/golint
- run: make lint
fuzzit:
docker:
- image: fuzzitdev/golang:1.12.7-buster
working_directory: /go/src/github.com/grpc-gateway/grpc-gateway
steps:
- checkout
- setup_remote_docker
- run: ./fuzzit.sh
bazel:
docker:
- image: l.gcr.io/google/bazel:latest
Expand Down Expand Up @@ -88,6 +96,10 @@ workflows:
jobs:
- build
- test
- fuzzit:
filters:
branches:
only: master
- node_test
- generate
- lint
Expand Down
11 changes: 11 additions & 0 deletions protoc-gen-grpc-gateway/httprule/fuzz.go
@@ -0,0 +1,11 @@
// +build gofuzz

package httprule

func Fuzz(data []byte) int {
_, err := Parse(string(data))
if err != nil {
return 0
}
return 0
}

0 comments on commit 8e0dde8

Please sign in to comment.