Skip to content

Commit 585ec7a

Browse files
authored
Merge pull request #333 from vroldanbet/fix-ci-build
Fix CI build
2 parents 9daa954 + 693b210 commit 585ec7a

26 files changed

+495
-1064
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ publish/
77
Gemfile.lock
88
.bundle
99
bin/
10+
.idea

.travis.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,42 @@ rvm:
33
- 2.0.0
44
- 2.1
55
- 2.2
6+
- 2.3
7+
- 2.4
8+
- 2.5
9+
- 2.6
610
# optional
711
- ruby-head
812
- jruby-19mode
913
- jruby-head
1014
- rbx-2
1115

16+
addons:
17+
hosts:
18+
- ldap.example.org # needed for TLS verification
19+
20+
services:
21+
- docker
22+
1223
env:
1324
- INTEGRATION=openldap
1425

1526
before_install:
1627
- gem update bundler
1728

1829
install:
19-
- if [ "$INTEGRATION" = "openldap" ]; then sudo script/install-openldap; fi
30+
- >
31+
docker run \
32+
--hostname ldap.example.org \
33+
--env LDAP_TLS_VERIFY_CLIENT=try \
34+
-p 389:389 \
35+
-p 636:636 \
36+
-v "$(pwd)"/test/fixtures/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom \
37+
--name openldap \
38+
--detach \
39+
osixia/openldap:1.3.0 \
40+
--copy-service \
41+
--loglevel debug \
2042
- bundle install
2143

2244
script: bundle exec rake ci

README.rdoc

+8-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,14 @@ This task will run the test suite and the
5353
rake rubotest
5454

5555
CI takes too long? If your local box supports
56-
{Vagrant}[https://www.vagrantup.com/], you can run most of the tests
57-
in a VM on your local box. For more details and setup instructions, see
58-
{test/support/vm/openldap/README.md}[https://github.com/ruby-ldap/ruby-net-ldap/tree/master/test/support/vm/openldap/README.md]
56+
{Docker}[https://www.docker.com/], you can also run integration tests locally.
57+
Simply run:
58+
59+
script/ldap-docker
60+
INTEGRATION=openldap rake test
61+
62+
CAVEAT: you need to add the following line to /etc/hosts
63+
127.0.0.1 ldap.example.org
5964

6065
== Release
6166

script/generate-fixture-ca

-48
This file was deleted.

script/install-openldap

-134
This file was deleted.

script/ldap-docker

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
# Usage: script/ldap-docker
3+
#
4+
# Starts a openldap docker container ready for integration tests
5+
6+
docker run --rm -ti \
7+
--hostname ldap.example.org \
8+
--env LDAP_TLS_VERIFY_CLIENT=try \
9+
-p 389:389 -p 636:636 \
10+
-v "$(pwd)"/test/fixtures/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom \
11+
--name my-openldap-container \
12+
osixia/openldap:1.3.0 --copy-service --loglevel debug

test/fixtures/ca/ca.info

-4
This file was deleted.

test/fixtures/ca/cacert.pem

-24
This file was deleted.

0 commit comments

Comments
 (0)