-
Notifications
You must be signed in to change notification settings - Fork 12
/
test.sh
executable file
·16 lines (12 loc) · 762 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
set -e
# Using -buildvcs=false because user in the container is root but mounted volume is owned by the user from the host
# See https://github.blog/2022-04-18-highlights-from-git-2-36/#stricter-repository-ownership-checks
echo 'Running Tests'
go test $(go list -buildvcs=false ./... | grep -v '/vendor/') -v -bench . -benchmem -race -coverprofile=coverage.txt -covermode=atomic
go test -fuzz=FuzzCalculateTargetSizeForResize -fuzztime 30s ./img/processor/internal/
go test -fuzz=FuzzCalculateTargetSizeForFit -fuzztime 30s ./img/processor/internal/
go test -fuzz=FuzzHttp_LoadImg -fuzztime 30s ./img/loader/
go test -fuzz=FuzzService_ResizeUrl -fuzztime 30s ./img/
echo 'Running go vet'
go vet $(go list -buildvcs=false ./... | grep -v '/vendor/')