File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 timeout : 5m
33
44linters :
5+ disable-all : true
56 enable :
67 - errcheck
78 - govet
8- - ineffassign
99 - staticcheck
1010 - unused
1111 - gosec
12- disable :
13- - depguard
1412
1513linters-settings :
1614 errcheck :
1715 check-type-assertions : false
18- exclude-functions :
19- - (*github.com/nightlyone/lockfile.Lockfile).Unlock
2016 gosec :
2117 excludes :
22- - G115 # integer overflow int64->uint64 on file sizes passed to humanize.Bytes — safe
18+ - G115 # integer overflow int64->uint64 on file sizes — safe
19+ - G112 # Slowloris in test code only
2320
2421issues :
2522 exclude-use-default : true
26- max-issues-per-linter : 50
27- max-same-issues : 10
23+ exclude-rules :
24+ - linters :
25+ - errcheck
26+ text : " lock.Unlock"
Original file line number Diff line number Diff line change @@ -31,10 +31,28 @@ function check_exit_code {
3131
3232}
3333
34+ # Directories that require MySQL binaries (sandbox, ts, ts_static)
35+ # are skipped unless SANDBOX_BINARY is set and contains MySQL installations
36+ SKIP_SANDBOX_TESTS=" "
37+ if [ -z " $SANDBOX_BINARY " ] || [ ! -d " $SANDBOX_BINARY " ] || [ -z " $( ls " $SANDBOX_BINARY " 2> /dev/null) " ]; then
38+ SKIP_SANDBOX_TESTS=" sandbox ts ts_static"
39+ echo " # Skipping sandbox/ts/ts_static tests (no MySQL binaries found in SANDBOX_BINARY=$SANDBOX_BINARY )"
40+ fi
41+
3442test_dirs=$( find . -name ' *_test.go' -exec dirname {} \; | tr -d ' ./' | sort | uniq)
3543
3644for dir in $test_dirs
3745do
46+ skip=0
47+ for skip_dir in $SKIP_SANDBOX_TESTS ; do
48+ if [ " $dir " == " $skip_dir " ]; then
49+ echo " # Skipping $dir (requires MySQL binaries)"
50+ skip=1
51+ break
52+ fi
53+ done
54+ [ " $skip " == " 1" ] && continue
55+
3856 cd $dir
3957 echo " # Testing $dir "
4058 go test -v -timeout 30m
You can’t perform that action at this time.
0 commit comments