Skip to content

Commit 6cfd595

Browse files
author
Bertrand Gouny
committed
nouveaux tests
1 parent e553d37 commit 6cfd595

File tree

11 files changed

+32
-14
lines changed

11 files changed

+32
-14
lines changed

test-repository.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
# Usage
4+
# sudo ./test.sh
5+
# add -v for verbose mode (or type whatever you like !) :p
6+
7+
. test/config-repository
8+
. test/tools/run.sh
9+
10+
run_test simple.sh "dn: dc=example,dc=com"
11+
run_test tls.sh "dn: dc=example,dc=com"
12+
run_test db.sh "dn: dc=otherdomain,dc=com"
13+
14+
. test/tools/end.sh
15+

test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# sudo ./test.sh
55
# add -v for verbose mode (or type whatever you like !) :p
66

7+
. test/config
78
. test/tools/run.sh
89

910
run_test tools/build-container.sh "Successfully built"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
testImage=openldap-test
22
testContainer=openldap-test-container
33
testDir=/osixia-test-docker-openldap
4+
5+
export testImage
6+
export testContainer
7+
export testDir
8+

test/config-repository

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
testImage=osixia/openldap:latest
2+
testContainer=openldap-repository-test-container
3+
testDir=/osixia-repository-test-docker-openldap
4+
5+
export testImage
6+
export testContainer
7+
export testDir

test/db.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/sh
22

33
dir=$(dirname $0)
4-
. $dir/tools/config.prop
54

65
if [ -d "$testDir" ]; then
76
rm -r $testDir

test/simple.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/sh
22

33
dir=$(dirname $0)
4-
. $dir/tools/config.prop
5-
64
. $dir/tools/run-container.sh
5+
76
echo "ldapsearch -x -h $IP -b dc=example,dc=com"
87
ldapsearch -x -h $IP -b dc=example,dc=com
98

test/tls.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/sh
22

33
dir=$(dirname $0)
4-
. $dir/tools/config.prop
5-
64
. $dir/tls/run.sh
5+
76
echo "ldapsearch -x -h $certCN -b dc=example,dc=com -ZZ"
87
ldapsearch -x -h $certCN -b dc=example,dc=com -ZZ
98

test/tools/build-container.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/sh
22

3-
. $(dirname $0)/config.prop
4-
53
docker.io build -t $testImage .
64
#docker.io build --no-cache=true -t $testImage .
75

test/tools/delete-container.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/sh
22

3-
. $(dirname $0)/config.prop
4-
53
# remove test container
64
res=$(docker.io ps -a | grep -c "$testContainer")
75

test/tools/delete-image.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/sh
22

3-
. $(dirname $0)/config.prop
4-
53
# remove test image
64
res=$(docker.io images | grep -c "$testImage")
75

0 commit comments

Comments
 (0)