diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 17:50:28 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 17:50:28 +0100 |
commit | 15f25480dddca4ad2af10f1bb96b4c8858cd4335 (patch) | |
tree | 0244e7e8e7687bd0d2443ad06c754a0ba1b9ff7c | |
parent | c8dc45d7337020902e3c177580a1060b9fa3297f (diff) | |
download | PeerTube-15f25480dddca4ad2af10f1bb96b4c8858cd4335.tar.gz PeerTube-15f25480dddca4ad2af10f1bb96b4c8858cd4335.tar.zst PeerTube-15f25480dddca4ad2af10f1bb96b4c8858cd4335.zip |
Split slow and fast api tests for travis
-rw-r--r-- | .travis.yml | 3 | ||||
-rwxr-xr-x | scripts/travis.sh | 6 | ||||
-rw-r--r-- | server/tests/api/index-fast.ts | 13 | ||||
-rw-r--r-- | server/tests/api/index-slow.ts | 4 | ||||
-rw-r--r-- | server/tests/api/index.ts | 17 |
5 files changed, 27 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml index 1ae32a1f9..bb7e2c130 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -39,7 +39,8 @@ before_script: | |||
39 | matrix: | 39 | matrix: |
40 | include: | 40 | include: |
41 | - env: TEST_SUITE=client | 41 | - env: TEST_SUITE=client |
42 | - env: TEST_SUITE=api | 42 | - env: TEST_SUITE=api-fast |
43 | - env: TEST_SUITE=api-slow | ||
43 | - env: TEST_SUITE=cli | 44 | - env: TEST_SUITE=cli |
44 | - env: TEST_SUITE=lint | 45 | - env: TEST_SUITE=lint |
45 | 46 | ||
diff --git a/scripts/travis.sh b/scripts/travis.sh index f6cdda463..e0a59806a 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh | |||
@@ -14,6 +14,12 @@ elif [ "$1" = "api" ]; then | |||
14 | elif [ "$1" = "cli" ]; then | 14 | elif [ "$1" = "cli" ]; then |
15 | npm run build:server | 15 | npm run build:server |
16 | mocha --exit --require ts-node/register --bail server/tests/cli/index.ts | 16 | mocha --exit --require ts-node/register --bail server/tests/cli/index.ts |
17 | elif [ "$1" = "api-fast" ]; then | ||
18 | npm run build:server | ||
19 | mocha --exit --require ts-node/register --bail server/tests/api/index-fast.ts | ||
20 | elif [ "$1" = "api-slow" ]; then | ||
21 | npm run build:server | ||
22 | mocha --exit --require ts-node/register --bail server/tests/api/index-slow.ts | ||
17 | elif [ "$1" = "lint" ]; then | 23 | elif [ "$1" = "lint" ]; then |
18 | cd client || exit -1 | 24 | cd client || exit -1 |
19 | npm run lint || exit -1 | 25 | npm run lint || exit -1 |
diff --git a/server/tests/api/index-fast.ts b/server/tests/api/index-fast.ts new file mode 100644 index 000000000..f13d8155d --- /dev/null +++ b/server/tests/api/index-fast.ts | |||
@@ -0,0 +1,13 @@ | |||
1 | // Order of the tests we want to execute | ||
2 | import './config' | ||
3 | import './check-params' | ||
4 | import './friends-basic' | ||
5 | import './users' | ||
6 | import './single-pod' | ||
7 | import './video-abuse' | ||
8 | import './video-blacklist' | ||
9 | import './video-blacklist-management' | ||
10 | import './video-description' | ||
11 | import './video-privacy' | ||
12 | import './services' | ||
13 | import './request-schedulers' | ||
diff --git a/server/tests/api/index-slow.ts b/server/tests/api/index-slow.ts new file mode 100644 index 000000000..e3b50e57a --- /dev/null +++ b/server/tests/api/index-slow.ts | |||
@@ -0,0 +1,4 @@ | |||
1 | // Order of the tests we want to execute | ||
2 | import './multiple-pods' | ||
3 | import './friends-advanced' | ||
4 | import './video-transcoder' | ||
diff --git a/server/tests/api/index.ts b/server/tests/api/index.ts index 371f1bc43..258502d26 100644 --- a/server/tests/api/index.ts +++ b/server/tests/api/index.ts | |||
@@ -1,16 +1,3 @@ | |||
1 | // Order of the tests we want to execute | 1 | // Order of the tests we want to execute |
2 | import './config' | 2 | import './index-fast' |
3 | import './check-params' | 3 | import './index-slow' |
4 | import './friends-basic' | ||
5 | import './users' | ||
6 | import './single-pod' | ||
7 | import './video-abuse' | ||
8 | import './video-blacklist' | ||
9 | import './video-blacklist-management' | ||
10 | import './video-description' | ||
11 | import './video-privacy' | ||
12 | import './multiple-pods' | ||
13 | import './services' | ||
14 | import './request-schedulers' | ||
15 | import './friends-advanced' | ||
16 | import './video-transcoder' | ||