Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
language: python
dist: bionic
sudo: false
python:
- 2.7
- 3.4
- 3.5
- 3.6
before_install:
- sudo add-apt-repository universe
- sudo apt-get update
- ./scripts/setup-389-ds.sh
install:
- pip install tox-travis
script:
Expand Down
38 changes: 38 additions & 0 deletions scripts/setup-389-ds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
set -eox

whoami

sudo apt-get install 389-ds-base python3-lib389


cat << EOF | sudo tee /root/instance.inf
# /root/instance.inf
[general]
config_version = 2

[slapd]
root_password = YOUR_ADMIN_PASSWORD_HERE

[backend-userroot]
sample_entries = yes
suffix = dc=example,dc=com
EOF

sudo dscreate from-file /root/instance.inf

dsctl localhost status

cat << EOF | sudo tee /root/.dsrc
[localhost]
# Note that '/' is replaced to '%%2f'.
uri = ldapi://%%2fvar%%2frun%%2fslapd-localhost.socket
basedn = dc=example,dc=com
binddn = cn=Directory Manager
EOF

sudo dsidm localhost user create --uid eve --cn Eve --displayName 'Eve User - Devpi test' --uidNumber 1001 --gidNumber 1001 --homeDirectory /home/eve
sudo dsidm localhost user create --uid alice --cn Alice --displayName 'Alice User - Devpi test' --uidNumber 1002 --gidNumber 1002 --homeDirectory /home/alice

sudo dsidm localhost group create --cn devpi_admins
sudo dsidm localhost group add_member devpi_admins uid=alice,ou=people,dc=example,dc=com