Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Commit 80306b9

Browse files
authored
WIP: add node versions (#941)
* add ldap healthcheck * use nonpriv ports * add node versions see #940
1 parent d22f2d4 commit 80306b9

3 files changed

Lines changed: 36 additions & 15 deletions

File tree

.github/workflows/test.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [12.x]
15+
node-version: [12.x, 13.x, 14.x, 15.x]
1616

1717
steps:
1818
- uses: actions/checkout@v2
@@ -39,7 +39,7 @@ jobs:
3939
fail-fast: false # if one job fails, others will not be aborted
4040
matrix:
4141
backendtype: ['', 'mssql', 'mysql', 'mariadb', 'postgres']
42-
node-version: [12.x]
42+
node-version: [12.x, 13.x, 14.x, 15.x]
4343

4444
steps:
4545
- uses: actions/checkout@v2
@@ -76,5 +76,13 @@ jobs:
7676
sleep 0.5
7777
done
7878
79+
- name: Verify ldap is healthy before starting
80+
run: |
81+
until docker ps | fgrep "(healthy)" | grep test-openldap ; do
82+
docker ps
83+
sleep 0.5
84+
done
85+
86+
7987
- name: Test
8088
run: npm run test${{ matrix.backendtype }} --prefix server

server/docker-compose.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,21 @@ services:
88
ldap:
99
image: rroemhild/test-openldap
1010
ports:
11-
- 389:389
12-
privileged: true
11+
- 10389:10389
12+
healthcheck:
13+
test:
14+
[
15+
'CMD',
16+
'ldapsearch',
17+
'-H', 'ldap://127.0.0.1:10389',
18+
'-D', 'cn=admin,dc=planetexpress,dc=com',
19+
'-w', 'GoodNewsEveryone',
20+
'-b', 'cn=admin,dc=planetexpress,dc=com'
21+
]
22+
interval: 3s
23+
timeout: 3s
24+
retries: 10
25+
1326

1427
mssql:
1528
image: 'mcr.microsoft.com/mssql/server:2017-latest'

server/test/auth/ldap.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('auth/ldap', function () {
88
// If LDAP is available to bind to continue with tests
99
const utils = new TestUtil({
1010
ldapAuthEnabled: true,
11-
ldapUrl: 'ldap://localhost:389',
11+
ldapUrl: 'ldap://localhost:10389',
1212
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
1313
ldapPassword: 'GoodNewsEveryone',
1414
});
@@ -24,7 +24,7 @@ describe('auth/ldap', function () {
2424
ldapAuthEnabled: true,
2525
ldapAutoSignUp: true,
2626
ldapDefaultRole: 'editor',
27-
ldapUrl: 'ldap://localhost:389',
27+
ldapUrl: 'ldap://localhost:10389',
2828
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
2929
ldapPassword: 'GoodNewsEveryone',
3030
ldapSearchFilter: '(uid={{username}})',
@@ -54,7 +54,7 @@ describe('auth/ldap', function () {
5454
ldapAuthEnabled: true,
5555
ldapAutoSignUp: true,
5656
ldapDefaultRole: 'admin',
57-
ldapUrl: 'ldap://localhost:389',
57+
ldapUrl: 'ldap://localhost:10389',
5858
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
5959
ldapPassword: 'GoodNewsEveryone',
6060
ldapSearchFilter: '(uid={{username}})',
@@ -84,7 +84,7 @@ describe('auth/ldap', function () {
8484
ldapAuthEnabled: true,
8585
ldapAutoSignUp: true,
8686
ldapDefaultRole: '',
87-
ldapUrl: 'ldap://localhost:389',
87+
ldapUrl: 'ldap://localhost:10389',
8888
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
8989
ldapPassword: 'GoodNewsEveryone',
9090
ldapSearchFilter: '(uid={{username}})',
@@ -110,7 +110,7 @@ describe('auth/ldap', function () {
110110
ldapAuthEnabled: true,
111111
ldapAutoSignUp: false,
112112
ldapDefaultRole: 'editor',
113-
ldapUrl: 'ldap://localhost:389',
113+
ldapUrl: 'ldap://localhost:10389',
114114
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
115115
ldapPassword: 'GoodNewsEveryone',
116116
ldapSearchFilter: '(uid={{username}})',
@@ -152,7 +152,7 @@ describe('auth/ldap', function () {
152152
const utils = new TestUtil({
153153
154154
ldapAuthEnabled: true,
155-
ldapUrl: 'ldap://localhost:389',
155+
ldapUrl: 'ldap://localhost:10389',
156156
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
157157
ldapPassword: 'GoodNewsEveryone',
158158
ldapSearchFilter: '(uid={{username}})',
@@ -184,7 +184,7 @@ describe('auth/ldap', function () {
184184
const utils = new TestUtil({
185185
186186
ldapAuthEnabled: true,
187-
ldapUrl: 'ldap://localhost:389',
187+
ldapUrl: 'ldap://localhost:10389',
188188
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
189189
ldapPassword: 'GoodNewsEveryone',
190190
ldapSearchFilter: '(uid={{username}})',
@@ -215,7 +215,7 @@ describe('auth/ldap', function () {
215215
ldapAuthEnabled: true,
216216
ldapAutoSignUp: true,
217217
ldapDefaultRole: 'editor',
218-
ldapUrl: 'ldap://localhost:389',
218+
ldapUrl: 'ldap://localhost:10389',
219219
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
220220
ldapPassword: 'GoodNewsEveryone',
221221
ldapSearchFilter: '(uid={{username}})',
@@ -264,7 +264,7 @@ describe('auth/ldap', function () {
264264
ldapAuthEnabled: true,
265265
ldapAutoSignUp: true,
266266
ldapDefaultRole: 'editor',
267-
ldapUrl: 'ldap://localhost:389',
267+
ldapUrl: 'ldap://localhost:10389',
268268
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
269269
ldapPassword: 'GoodNewsEveryone',
270270
ldapSearchFilter: '(uid={{username}})',
@@ -304,7 +304,7 @@ describe('auth/ldap', function () {
304304
ldapAuthEnabled: true,
305305
ldapAutoSignUp: true,
306306
ldapDefaultRole: 'editor',
307-
ldapUrl: 'ldap://localhost:389',
307+
ldapUrl: 'ldap://localhost:10389',
308308
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
309309
ldapPassword: 'GoodNewsEveryone',
310310
ldapSearchFilter: '(uid={{username}})',
@@ -344,7 +344,7 @@ describe('auth/ldap', function () {
344344
ldapAuthEnabled: true,
345345
ldapAutoSignUp: true,
346346
ldapDefaultRole: 'editor',
347-
ldapUrl: 'ldap://localhost:389',
347+
ldapUrl: 'ldap://localhost:10389',
348348
ldapBindDN: 'cn=admin,dc=planetexpress,dc=com',
349349
ldapPassword: 'GoodNewsEveryone',
350350
ldapSearchFilter: '(uid={{username}})',

0 commit comments

Comments
 (0)