aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/test.yml6
-rw-r--r--.gitlab-ci.yml30
-rwxr-xr-xscripts/ci.sh2
-rw-r--r--server/tests/external-plugins/auth-ldap.ts4
4 files changed, 7 insertions, 35 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 28ebf2ca9..0c31b73fc 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -71,9 +71,11 @@ jobs:
71 - name: Install dependencies 71 - name: Install dependencies
72 run: yarn install --frozen-lockfile 72 run: yarn install --frozen-lockfile
73 73
74 - name: Set videos import enabled env variable 74 - name: Set env test variable (schedule)
75 if: github.event_name != 'schedule' 75 if: github.event_name != 'schedule'
76 run: echo "::set-env name=DISABLE_HTTP_IMPORT_TESTS::true" 76 run: |
77 echo "::set-env name=DISABLE_HTTP_IMPORT_TESTS::true"
78 echo "::set-env name=DISABLE_EXTERNAL_PLUGINS_TESTS::true"
77 79
78 - name: Run Test 80 - name: Run Test
79 run: NODE_PENDING_JOB_WAIT=2000 npm run ci -- ${{ matrix.test_suite }} 81 run: NODE_PENDING_JOB_WAIT=2000 npm run ci -- ${{ matrix.test_suite }}
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3891187e8..358257209 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,11 +1,8 @@
1image: chocobozzz/peertube-ci:10 1image: chocobozzz/peertube-ci:10
2 2
3stages: 3stages:
4 - build-and-lint
5 - test
6 - clients 4 - clients
7 - docker-nightly 5 - docker-nightly
8 - external-plugins
9 6
10cache: 7cache:
11 key: yarn 8 key: yarn
@@ -74,30 +71,3 @@ build-docker-master:
74 - master 71 - master
75 variables: 72 variables:
76 DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster 73 DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster
77
78test-external-plugins:
79 stage: external-plugins
80 only:
81 - schedules
82 services:
83 - name: postgres:9.6
84 alias: postgres
85 - name: redis:latest
86 alias: redis
87 - name: rroemhild/test-openldap
88 alias: ldap
89 variables:
90 POSTGRES_USER: peertube
91 POSTGRES_HOST_AUTH_METHOD: trust
92 REDIS_HOST: redis
93 artifacts:
94 expire_in: 1 day
95 paths:
96 - test*/logs
97 when: always
98 before_script:
99 - 'sed -i -z "s/database:\n hostname: ''localhost''/database:\n hostname: ''postgres''/" config/test.yaml'
100 - 'sed -i -z "s/redis:\n hostname: ''localhost''/redis:\n hostname: ''redis''/" config/test.yaml'
101 - NOCLIENT=1 yarn install --pure-lockfile --cache-folder .yarn-cache
102 script:
103 - PGHOST=postgres PGUSER=peertube npm run ci -- "external-plugins"
diff --git a/scripts/ci.sh b/scripts/ci.sh
index df9d6d2b2..c735c8d5c 100755
--- a/scripts/ci.sh
+++ b/scripts/ci.sh
@@ -65,7 +65,7 @@ elif [ "$1" = "api-3" ]; then
65 65
66 videosFiles=$(findTestFiles server/tests/api/videos) 66 videosFiles=$(findTestFiles server/tests/api/videos)
67 67
68 runTest 1 $videosFiles 68 MOCHA_PARALLEL=true runTest 2 $videosFiles
69elif [ "$1" = "api-4" ]; then 69elif [ "$1" = "api-4" ]; then
70 npm run build:server 70 npm run build:server
71 71
diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts
index 0f0a08532..bb02fbc02 100644
--- a/server/tests/external-plugins/auth-ldap.ts
+++ b/server/tests/external-plugins/auth-ldap.ts
@@ -47,7 +47,7 @@ describe('Official plugin auth-ldap', function () {
47 'mail-property': 'mail', 47 'mail-property': 'mail',
48 'search-base': 'ou=people,dc=planetexpress,dc=com', 48 'search-base': 'ou=people,dc=planetexpress,dc=com',
49 'search-filter': '(|(mail={{username}})(uid={{username}}))', 49 'search-filter': '(|(mail={{username}})(uid={{username}}))',
50 'url': 'ldap://ldap:390', 50 'url': 'ldap://localhost:390',
51 'username-property': 'uid' 51 'username-property': 'uid'
52 } 52 }
53 }) 53 })
@@ -67,7 +67,7 @@ describe('Official plugin auth-ldap', function () {
67 'mail-property': 'mail', 67 'mail-property': 'mail',
68 'search-base': 'ou=people,dc=planetexpress,dc=com', 68 'search-base': 'ou=people,dc=planetexpress,dc=com',
69 'search-filter': '(|(mail={{username}})(uid={{username}}))', 69 'search-filter': '(|(mail={{username}})(uid={{username}}))',
70 'url': 'ldap://ldap:389', 70 'url': 'ldap://localhost:389',
71 'username-property': 'uid' 71 'username-property': 'uid'
72 } 72 }
73 }) 73 })