forked from liberkee/openldapjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (37 loc) · 1.44 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
language: node_js
node_js:
- "4"
- "5"
- "6"
- "7"
- "8"
- "9"
env:
- CXX=g++-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- ldap-utils
- slapd
- libldap2-dev
before_script:
- sudo apt install gnutls-bin ssl-cert
- sudo sh -c "certtool --generate-privkey > /etc/ssl/private/cakey.pem"
- sudo certtool --generate-self-signed --load-privkey /etc/ssl/private/cakey.pem --template ./test/test_tool/ca.info --outfile /etc/ssl/certs/cacert.pem
- sudo certtool --generate-privkey --bits 1024 --outfile /etc/ssl/private/ldap01_slapd_key.pem
- sudo certtool --generate-certificate --load-privkey /etc/ssl/private/ldap01_slapd_key.pem --load-ca-certificate /etc/ssl/certs/cacert.pem --load-ca-privkey /etc/ssl/private/cakey.pem --template ./test/test_tool/ldap01.info --outfile /etc/ssl/certs/ldap01_slapd_cert.pem
- sudo chgrp openldap /etc/ssl/private/ldap01_slapd_key.pem
- sudo chmod 0640 /etc/ssl/private/ldap01_slapd_key.pem
- sudo gpasswd -a openldap ssl-cert
- sudo service slapd stop
- sudo rm -R /etc/ldap/slapd.d/
- sudo mkdir /etc/ldap/slapd.d/
- sudo slapadd -F /etc/ldap/slapd.d/ -n 0 -l ./test/test_tool/n0config.ldif
- sudo chmod 777 -R /etc/ldap/
- sudo service slapd restart
- ldapadd -D cn=admin,dc=demoApp,dc=com -w secret -f ./test/test_tool/light_db.ldif -c
- ldapsearch -D cn=admin,dc=demoApp,dc=com -w secret -b dc=demoApp,dc=com
- npm run addData