Skip to content

Commit 9b8d80d

Browse files
committed
installs docker container CA certificate
so that we are able to run a test that does not specific CACERT and so the library fallsback to system cert store
1 parent 839318a commit 9b8d80d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ before_install:
2424

2525
install:
2626
- docker run --hostname ldap.example.org --env LDAP_TLS_VERIFY_CLIENT=try -p 389:389 -p 636:636 -v $(pwd)/test/fixtures/seed.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif -v $(pwd)/test/fixtures/openldap/retcode.ldif:/container/service/slapd/assets/config/bootstrap/ldif/06-retcodes.ldif --name openldap --detach osixia/openldap:1.3.0 --copy-service --loglevel debug
27-
- docker cp openldap:/container/run/service/:ssl-tools/assets/default-ca/default-ca.pem /tmp/openldap-ca.pem
27+
- cp $(pwd)/test/fixtures/ca/docker-ca.pem /etc/ssl/certs/cacert.pem
28+
- update-ca-certificates
2829
- bundle install
2930

3031
script: bundle exec rake ci

test/integration/test_bind.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def test_bind_tls_with_multiple_bogus_hosts_ca_check_only_fails
210210
def test_bind_tls_valid_hostname_system_ca_on_travis_passes
211211
omit_unless ENV['TRAVIS'] == 'true'
212212

213+
@ldap.host = INTEGRATION_HOSTNAME
213214
@ldap.encryption(
214215
method: :start_tls,
215216
tls_options: { verify_mode: OpenSSL::SSL::VERIFY_PEER },

0 commit comments

Comments
 (0)