mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 19:29:15 +00:00
Fix gqlgen (#1105)
This commit is contained in:
13
scripts/test_all.sh
Executable file
13
scripts/test_all.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
for test in $(dirname $0)/test_*
|
||||
do
|
||||
if [ "${test}" != "${test%%/scripts/test_all.sh}" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo Running ${test}...
|
||||
${test}
|
||||
done
|
||||
5
scripts/test_api_coverage.sh
Executable file
5
scripts/test_api_coverage.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cd $(dirname $0)/../api
|
||||
go test ./... -v -database -filesystem -p 1 -coverprofile=coverage.txt -covermode=atomic
|
||||
11
scripts/test_is_generated_code_in_sync.sh
Executable file
11
scripts/test_is_generated_code_in_sync.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cd $(dirname $0)/../api
|
||||
go generate ./...
|
||||
if [ "$(git status -s 2>/dev/null | head -1)" != "" ]; then
|
||||
echo '--- FAIL: The generated API code is out of sync with the recent changes. Please run `go generate ./...` under `./api` to regenerate it and commit it to this branch.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo '--- PASS: All generated code is in sync with the project.'
|
||||
Reference in New Issue
Block a user