Skip to content

Commit

Permalink
Add initial fuzz testing
Browse files Browse the repository at this point in the history
  • Loading branch information
angelini committed Oct 27, 2022
1 parent 8e33f21 commit de284ab
Show file tree
Hide file tree
Showing 7 changed files with 713 additions and 5 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ jobs:
- run: nix develop -c make build
- run: nix develop -c make test

test-fuzz:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/setup-env
- run: nix develop -c dev &
- run: nix develop -c make build
- run: nix develop -c make setup-local
- run: nix develop -c make server &
- run: nix develop -c make test-fuzz

test-js:
runs-on: ubuntu-20.04
steps:
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ PROTO_TS_FILES := $(shell find js/src/pb -type f -name '*.ts')
MIGRATE_DIR := ./migrations
SERVICE := $(PROJECT).server

.PHONY: install migrate migrate-create clean build release test test-one test-js lint-js typecheck-js
.PHONY: install migrate migrate-create clean build release
.PHONY: test test-one test-fuzz test-js lint-js typecheck-js
.PHONY: reset-db setup-local server server-profile js-install
.PHONY: client-update client-large-update client-get client-rebuild client-pack
.PHONY: client-gc-contents client-gc-project client-gc-random-projects
Expand Down Expand Up @@ -117,6 +118,11 @@ else
cd test && go test -run $(name)
endif

test-fuzz: export DL_TOKEN=$(DEV_TOKEN_ADMIN)
test-fuzz: export DL_SKIP_SSL_VERIFICATION=1
test-fuzz: reset-db
go run cmd/fuzz-test/main.go --server $(GRPC_SERVER) --iterations 1000 --projects 5

test-js: js-install
cd js && npm run test

Expand Down
Loading

0 comments on commit de284ab

Please sign in to comment.