Skip to content

Commit b1e6a81

Browse files
committed
skip performance tests by default
1 parent 6cf86ad commit b1e6a81

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

do.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ coveragereport() {
181181
}
182182

183183
test() {
184+
export SKIPPERFTEST=true;
185+
_tests
186+
}
187+
188+
test_perf() {
189+
_tests
190+
}
191+
192+
_tests() {
184193
if [ -z "$VOUCH_CONFIG" ]; then
185194
export VOUCH_CONFIG="$SDIR/config/testing/test_config.yml"
186195
fi
@@ -382,7 +391,8 @@ usage() {
382391
$0 drun [args] - run docker container
383392
$0 dbuildalpine - build docker container for alpine
384393
$0 drunalpine [args] - run docker container for alpine
385-
$0 test [./pkg_test.go] - run go tests (defaults to all tests)
394+
$0 test [./pkg_test.go] - run go tests (defaults to NOT run performance tests)
395+
$0 test_perf - run go tests including performance tests
386396
$0 test_logging - test the logging output
387397
$0 coverage - coverage test
388398
$0 coveragereport - coverage report published to .cover/coverage.html
@@ -421,6 +431,7 @@ case "$ARG" in
421431
|'stats' \
422432
|'usage' \
423433
|'bug_report' \
434+
|'test_perf' \
424435
|'test_logging' \
425436
|'license' \
426437
|'profile' \

handlers/validate_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ func TestValidateRequestHandlerPerf(t *testing.T) {
6565
if _, ok := os.LookupEnv("ISTRAVIS"); ok {
6666
t.Skip("travis doesn't like perf tests, skipping")
6767
}
68+
if _, ok := os.LookupEnv("SKIPPERFTEST"); ok {
69+
t.Skip("skipping performance tests")
70+
}
6871

6972
setUp("/config/testing/handler_email.yml")
7073
user := &structs.User{Username: "testuser", Email: "test@example.com", Name: "Test Name"}

0 commit comments

Comments
 (0)