forked from dsbenghe/Novell.Directory.Ldap.NETStandard
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
58 lines (54 loc) · 2.51 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
sudo: required
dist: trusty
language: csharp
dotnet: 1.0.0-preview2-1-003177
mono: none
env:
- CONFIGURATION=Release NOTHREADS=10 SECURITY=OFF
- CONFIGURATION=Release NOTHREADS=10 SECURITY=SSL
- CONFIGURATION=Release NOTHREADS=10 SECURITY=TLS
- CONFIGURATION=Release NOTHREADS=20 SECURITY=OFF
- CONFIGURATION=Release NOTHREADS=20 SECURITY=SSL
- CONFIGURATION=Release NOTHREADS=20 SECURITY=TLS
- CONFIGURATION=Release NOTHREADS=50 SECURITY=OFF
- CONFIGURATION=Release NOTHREADS=50 SECURITY=SSL
- CONFIGURATION=Release NOTHREADS=50 SECURITY=TLS
- CONFIGURATION=Debug NOTHREADS=50 SECURITY=OFF
- CONFIGURATION=Debug NOTHREADS=50 SECURITY=SSL
- CONFIGURATION=Debug NOTHREADS=50 SECURITY=TLS
addons:
apt:
packages:
- ldap-utils
- gnutls-bin
- ssl-cert
- slapd
before_script:
- whoami
- mkdir /tmp/slapd
# start setup ssl
# prepare folders
- mkdir -p /tmp/ssl/private
- mkdir -p /tmp/ssl/certs
# generate certs/keys
- sudo certtool -p --outfile /tmp/ssl/private/ca_server.key
- sudo certtool -s --load-privkey /tmp/ssl/private/ca_server.key --template test/conf/cert_template.conf --outfile /tmp/ssl/certs/ca_server.pem
- sudo certtool -p --sec-param low --outfile /tmp/ssl/private/ldap_server.key
- sudo certtool -c --load-privkey /tmp/ssl/private/ldap_server.key --load-ca-certificate /tmp/ssl/certs/ca_server.pem --load-ca-privkey /tmp/ssl/private/ca_server.key --template test/conf/cert_template.conf --outfile /tmp/ssl/certs/ldap_server.pem
# permissions
- sudo usermod -aG ssl-cert travis
- sudo chown travis:ssl-cert /tmp/ssl/private/ldap_server.key /tmp/ssl/certs/ldap_server.pem /tmp/ssl/certs/ca_server.pem
- sudo chmod 640 /tmp/ssl/private/ldap_server.key /tmp/ssl/certs/ldap_server.pem /tmp/ssl/certs/ca_server.pem
# end setup ssl
# start ssl
- slapd -f test/conf/slapd.conf -h "ldap://localhost:4389 ldaps://localhost:4636" &
# give openldap enough time to start
- sleep 5
# test to see that is running
- ldapwhoami -H ldap://localhost:4389 -D "cn=root,dc=example,dc=com" -w password
- ldapadd -h localhost:4389 -D cn=root,dc=example,dc=com -w password -f test/conf/baseDn.ldif
script:
- dotnet restore
- dotnet build --configuration $CONFIGURATION **/project.json
- export TRANSPORT_SECURITY=$SECURITY; dotnet test --configuration $CONFIGURATION test/Novell.Directory.Ldap.NETStandard.FunctionalTests/project.json
- export TRANSPORT_SECURITY=$SECURITY; dotnet run --configuration $CONFIGURATION --project test/Novell.Directory.Ldap.NETStandard.StressTests/project.json $NOTHREADS 45