Verified Commit 595d729c authored by Luc Didry's avatar Luc Didry
Browse files

Fix test-ldap with newer versions of rroemhild/test-openldap container

parent e7b5c9f1
Pipeline #378153 passed with stage
in 2 minutes and 33 seconds
......@@ -10,12 +10,12 @@ Tests can be launched with `npm run test`.
LDAP tests an be launched with `npm run test-ldap`.
You will need to have the [mockup LDAP server](https://github.com/rroemhild/docker-test-openldap) launched on your computer to run the LDAP tests:
You will need to have the [mockup LDAP server](https://github.com/rroemhild/docker-test-openldap) launched on your computer to run the LDAP tests.
The first time you start the container:
```
docker run --privileged -d -p 389:389 rroemhild/test-openldap --name test-openldap
docker run --privileged -d -p 10389:10389 rroemhild/test-openldap --name test-openldap
```
After the first start of the container, you will be able to start it with:
......@@ -23,3 +23,8 @@ After the first start of the container, you will be able to start it with:
```
docker start test-openldap
```
You will also need to make `rroemhild-test-openldap` resolve as your localhost (add it to your `/etc/hosts` file).
NOTE: the container `rroemhild/test-openldap` used to listen to ports 389 and 636 but the latest versions listen to ports 10389 and 10636.
If `npm run test-ldap` with errors like `ECONNREFUSED 127.0.0.1:389`, either to a `docker pull rroemhild/test-openldap:latest` or start the container with `389:389` port translation.
......@@ -36,7 +36,7 @@ catch (e) {
settings = {
'ep_mypads': {
'ldap': {
'url': 'ldap://rroemhild-test-openldap',
'url': 'ldap://rroemhild-test-openldap:10389',
'bindDN': 'cn=admin,dc=planetexpress,dc=com',
'bindCredentials': 'GoodNewsEveryone',
'searchBase': 'ou=people,dc=planetexpress,dc=com',
......
......@@ -60,7 +60,7 @@
function (done) {
var res = conf.get('authLdapSettings');
expect(res).toEqual({
url: 'ldap://rroemhild-test-openldap',
url: 'ldap://rroemhild-test-openldap:10389',
bindDN: 'cn=admin,dc=planetexpress,dc=com',
bindCredentials: 'GoodNewsEveryone',
searchBase: 'ou=people,dc=planetexpress,dc=com',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment