Archived
tests
This commit is contained in:
1 parent
4e610b3b46
commit
73bf28d2c5
8 files changed
+25
-30
No files matched your search
@@ -6,15 +6,15 @@ status () {
|
||||
echo "---> ${@}" >&2
|
||||
}
|
||||
|
||||
set -x
|
||||
: LDAP_ADMIN_PWD=${LDAP_ADMIN_PWD}
|
||||
: LDAP_DOMAIN=${LDAP_DOMAIN}
|
||||
: LDAP_ORGANISATION=${LDAP_ORGANISATION}
|
||||
|
||||
|
||||
if [ ! -e /var/lib/ldap/docker_bootstrapped ]; then
|
||||
status "configuring slapd for first run"
|
||||
|
||||
set -x
|
||||
: LDAP_ADMIN_PWD=${LDAP_ADMIN_PWD}
|
||||
: LDAP_DOMAIN=${LDAP_DOMAIN}
|
||||
: LDAP_ORGANISATION=${LDAP_ORGANISATION}
|
||||
|
||||
|
||||
# permission error on /etc/ldap/slapd.conf if not set?! :'(
|
||||
adduser openldap root
|
||||
|
||||
@@ -37,7 +37,6 @@ EOF
|
||||
|
||||
dpkg-reconfigure -f noninteractive slapd
|
||||
|
||||
|
||||
############ Custom config ############
|
||||
slapd -h "ldap:/// ldapi:///" -u openldap -g openldap
|
||||
chown -R openldap:openldap /etc/ldap
|
||||
@@ -60,7 +59,7 @@ EOF
|
||||
fi
|
||||
|
||||
# Replication
|
||||
# todo
|
||||
# todo :)
|
||||
|
||||
# Other config files
|
||||
for f in $(find /etc/ldap/config -maxdepth 1 -name \*.ldif -type f); do
|
||||
@@ -70,6 +69,8 @@ EOF
|
||||
|
||||
kill -INT `cat /run/slapd/slapd.pid`
|
||||
|
||||
unset LDAP_ADMIN_PWD
|
||||
|
||||
touch /var/lib/ldap/docker_bootstrapped
|
||||
|
||||
else
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
sudo docker.io build -t openldap-test .
|
||||
#sudo docker.io build --no-cache=true -t openldap-test .
|
||||
#sudo docker.io build -t openldap-test .
|
||||
sudo docker.io build --no-cache=true -t openldap-test .
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# remove openldap test containers
|
||||
sudo docker.io ps -a > testcontainers.out
|
||||
|
||||
if [ "$(grep -c "openldap-test-container" ./testcontainers.out)" -ne 0 ]; then
|
||||
sudo docker.io stop openldap-test-container
|
||||
sudo docker.io rm openldap-test-container
|
||||
fi
|
||||
|
||||
rm testcontainers.out
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
./test/delete-container.sh
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
./test/delete-container.sh
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# remove openldap test container
|
||||
sudo docker.io ps -a > testcontainer.out
|
||||
docker.io ps -a > testcontainer.out
|
||||
|
||||
if [ "$(grep -c "openldap-test-container" ./testcontainer.out)" -ne 0 ]; then
|
||||
sudo docker.io stop openldap-test-container
|
||||
sudo docker.io rm openldap-test-container
|
||||
docker.io stop openldap-test-container
|
||||
docker.io rm openldap-test-container
|
||||
fi
|
||||
|
||||
rm testcontainer.out
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# remove openldap test image
|
||||
docker.io images > testimage.out
|
||||
|
||||
if [ "$(grep -c "openldap-test" ./testimage.out)" -ne 0 ]; then
|
||||
docker.io rmi openldap-test
|
||||
fi
|
||||
|
||||
rm testimage.out
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
./test/tools/delete-container.sh
|
||||
./test/tools/delete-image.sh
|
||||
Reference in new issue
Block a user