Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Correctly test ldap

Chocobozzzf9d2deae3a82
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 28ebf2ca92..0c31b73fcb 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -71,9 +71,11 @@ jobs:
- name: Install dependencies
run: yarn install --frozen-lockfile
- - name: Set videos import enabled env variable
+ - name: Set env test variable (schedule)
if: github.event_name != 'schedule'
- run: echo "::set-env name=DISABLE_HTTP_IMPORT_TESTS::true"
+ run: |
+ echo "::set-env name=DISABLE_HTTP_IMPORT_TESTS::true"
+ echo "::set-env name=DISABLE_EXTERNAL_PLUGINS_TESTS::true"
- name: Run Test
run: NODE_PENDING_JOB_WAIT=2000 npm run ci -- ${{ matrix.test_suite }}
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3891187e86..3582572097 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,11 +1,8 @@
image: chocobozzz/peertube-ci:10
stages:
- - build-and-lint
- - test
- clients
- docker-nightly
- - external-plugins
cache:
key: yarn
@@ -74,30 +71,3 @@ build-docker-master:
- master
variables:
DOCKER_IMAGE_NAME: chocobozzz/peertube:production-buster
-
-test-external-plugins:
- stage: external-plugins
- only:
- - schedules
- services:
- - name: postgres:9.6
- alias: postgres
- - name: redis:latest
- alias: redis
- - name: rroemhild/test-openldap
- alias: ldap
- variables:
- POSTGRES_USER: peertube
- POSTGRES_HOST_AUTH_METHOD: trust
- REDIS_HOST: redis
- artifacts:
- expire_in: 1 day
- paths:
- - test*/logs
- when: always
- before_script:
- - 'sed -i -z "s/database:\n hostname: ''localhost''/database:\n hostname: ''postgres''/" config/test.yaml'
- - 'sed -i -z "s/redis:\n hostname: ''localhost''/redis:\n hostname: ''redis''/" config/test.yaml'
- - NOCLIENT=1 yarn install --pure-lockfile --cache-folder .yarn-cache
- script:
- - PGHOST=postgres PGUSER=peertube npm run ci -- "external-plugins"
diff --git a/scripts/ci.sh b/scripts/ci.sh
index df9d6d2b21..c735c8d5ca 100755
--- a/scripts/ci.sh
+++ b/scripts/ci.sh
@@ -65,7 +65,7 @@ elif [ "$1" = "api-3" ]; then
videosFiles=$(findTestFiles server/tests/api/videos)
- runTest 1 $videosFiles
+ MOCHA_PARALLEL=true runTest 2 $videosFiles
elif [ "$1" = "api-4" ]; then
npm run build:server
diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts
index 0f0a085324..bb02fbc029 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 () {
'mail-property': 'mail',
'search-base': 'ou=people,dc=planetexpress,dc=com',
'search-filter': '(|(mail={{username}})(uid={{username}}))',
- 'url': 'ldap://ldap:390',
+ 'url': 'ldap://localhost:390',
'username-property': 'uid'
}
})
@@ -67,7 +67,7 @@ describe('Official plugin auth-ldap', function () {
'mail-property': 'mail',
'search-base': 'ou=people,dc=planetexpress,dc=com',
'search-filter': '(|(mail={{username}})(uid={{username}}))',
- 'url': 'ldap://ldap:389',
+ 'url': 'ldap://localhost:389',
'username-property': 'uid'
}
})