Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI build #333

Merged
merged 30 commits into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c3f0e4c
docker openldap server
vroldanbet Nov 13, 2019
fdbe61e
clarify why we need it
vroldanbet Nov 13, 2019
ddd8dce
there is an officially supported mechanism to add hostnames in Travis CI
vroldanbet Nov 13, 2019
3caf85b
let's use good old example.org
vroldanbet Nov 13, 2019
683d660
change test DSN and authenticate with the right user
vroldanbet Nov 13, 2019
fb4c76d
adjust hostname to the new certificate for TLS tests
vroldanbet Nov 13, 2019
94c2ba9
need to detach container so it does not block execution
vroldanbet Nov 13, 2019
4280d18
adds custom retcode.ldif to the bootstrap sequence
vroldanbet Nov 13, 2019
f38c39c
disabling this test - it's returning connection refused instead
vroldanbet Nov 13, 2019
1b595b2
let's assume folks will have to modify /etc/hosts
vroldanbet Nov 13, 2019
ba225a9
we don't need vagrant specific tests anymore
vroldanbet Nov 13, 2019
376c42e
this does not need to run only in CI if devs edit /etc/hosts
vroldanbet Nov 13, 2019
839318a
add docker container CA certificate and use if in fixtures
vroldanbet Nov 13, 2019
9b8d80d
installs docker container CA certificate
vroldanbet Nov 13, 2019
7c85643
let's disable the test that uses system cert store
vroldanbet Nov 13, 2019
6c1c56d
remove unused stuff
vroldanbet Nov 13, 2019
f67e741
script to start docker openldap server for integration tests
vroldanbet Nov 13, 2019
5c4644e
rubymine warning: quote to avoid word splitting
vroldanbet Nov 13, 2019
10a44d5
add most recent ruby versions
vroldanbet Nov 13, 2019
8ba87b3
update documentation
vroldanbet Nov 13, 2019
201fdfa
clarify /etc/hosts caveat, needed for local integration tests
vroldanbet Nov 13, 2019
dc6d75d
remove empty file (I messed up while cherry-picking)
vroldanbet Nov 14, 2019
fee04d8
attempt to make docker command more readable
vroldanbet Nov 14, 2019
fef7cdb
what about this
vroldanbet Nov 14, 2019
cf4e9bd
add backslash to bash command
vroldanbet Nov 14, 2019
35bcc92
format the snippet as code
vroldanbet Nov 15, 2019
b90ee7e
enable bind timeout test using non-routable IP
vroldanbet Nov 15, 2019
a9228e2
Merge remote-tracking branch 'origin/fix-ci-build' into fix-ci-build
vroldanbet Nov 15, 2019
14dfc2a
ignore RubyMine metadata
vroldanbet Nov 15, 2019
693b210
mount ldif folder instead of individual files
vroldanbet Nov 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ publish/
Gemfile.lock
.bundle
bin/
.idea
24 changes: 23 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,42 @@ rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
# optional
- ruby-head
- jruby-19mode
- jruby-head
- rbx-2

addons:
hosts:
- ldap.example.org # needed for TLS verification

services:
- docker

env:
- INTEGRATION=openldap

before_install:
- gem update bundler

install:
- if [ "$INTEGRATION" = "openldap" ]; then sudo script/install-openldap; fi
- >
docker run \
--hostname ldap.example.org \
--env LDAP_TLS_VERIFY_CLIENT=try \
-p 389:389 \
-p 636:636 \
-v "$(pwd)"/test/fixtures/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom \
--name openldap \
--detach \
osixia/openldap:1.3.0 \
--copy-service \
--loglevel debug \
- bundle install

script: bundle exec rake ci
Expand Down
11 changes: 8 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ This task will run the test suite and the
rake rubotest

CI takes too long? If your local box supports
{Vagrant}[https://www.vagrantup.com/], you can run most of the tests
in a VM on your local box. For more details and setup instructions, see
{test/support/vm/openldap/README.md}[https://github.com/ruby-ldap/ruby-net-ldap/tree/master/test/support/vm/openldap/README.md]
{Docker}[https://www.docker.com/], you can also run integration tests locally.
Simply run:

script/ldap-docker
INTEGRATION=openldap rake test

CAVEAT: you need to add the following line to /etc/hosts
127.0.0.1 ldap.example.org

== Release

Expand Down
48 changes: 0 additions & 48 deletions script/generate-fixture-ca

This file was deleted.

134 changes: 0 additions & 134 deletions script/install-openldap

This file was deleted.

12 changes: 12 additions & 0 deletions script/ldap-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Usage: script/ldap-docker
#
# Starts a openldap docker container ready for integration tests

docker run --rm -ti \
--hostname ldap.example.org \
--env LDAP_TLS_VERIFY_CLIENT=try \
-p 389:389 -p 636:636 \
-v "$(pwd)"/test/fixtures/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom \
--name my-openldap-container \
osixia/openldap:1.3.0 --copy-service --loglevel debug
4 changes: 0 additions & 4 deletions test/fixtures/ca/ca.info

This file was deleted.

24 changes: 0 additions & 24 deletions test/fixtures/ca/cacert.pem

This file was deleted.

Loading