aboutsummaryrefslogtreecommitdiff
path: root/test_automatic
diff options
context:
space:
mode:
Diffstat (limited to 'test_automatic')
-rw-r--r--test_automatic/config.json.test13
-rw-r--r--test_automatic/integration.go1
-rwxr-xr-xtest_automatic/start_test.sh9
3 files changed, 19 insertions, 4 deletions
diff --git a/test_automatic/config.json.test b/test_automatic/config.json.test
new file mode 100644
index 0000000..bc1eeec
--- /dev/null
+++ b/test_automatic/config.json.test
@@ -0,0 +1,13 @@
+{
+ "suffix": "dc=deuxfleurs,dc=fr",
+ "bind": "127.0.0.1:1389",
+ "acl": [
+ "ANONYMOUS::bind:*,ou=users,dc=deuxfleurs,dc=fr:",
+ "ANONYMOUS::bind:cn=admin,dc=deuxfleurs,dc=fr:",
+ "*,dc=deuxfleurs,dc=fr::read:*:* !userpassword",
+ "*::read modify:SELF:*",
+ "cn=admin,dc=deuxfleurs,dc=fr::read add modify delete:*:*",
+ "*:cn=admin,ou=groups,dc=deuxfleurs,dc=fr:read add modify delete:*:*"
+ ]
+}
+
diff --git a/test_automatic/integration.go b/test_automatic/integration.go
index e5a4737..d55d280 100644
--- a/test_automatic/integration.go
+++ b/test_automatic/integration.go
@@ -425,6 +425,7 @@ func main() {
printError(err)
log.Info("Clean succes")
+ defer os.Exit(0)
return
}
diff --git a/test_automatic/start_test.sh b/test_automatic/start_test.sh
index 38fe706..e7a1712 100755
--- a/test_automatic/start_test.sh
+++ b/test_automatic/start_test.sh
@@ -1,11 +1,12 @@
-#!/bin/bash
+#!/bin/sh
-trap "kill 0" EXIT
-
-export BOTTIN_DEFAULT_ADMIN_PW=$(openssl rand -base64 24)
+#export BOTTIN_DEFAULT_ADMIN_PW=$(openssl rand -base64 24)
echo $BOTTIN_DEFAULT_ADMIN_PW
consul agent -dev > /dev/null 2>&1 &
sleep 2
+cp test_automatic/config.json.test config.json
./bottin > /dev/null 2>&1 &
sleep 1
./test_automatic/integration
+rm config.json
+exit 0