fix travis config & tests
diff --git a/.travis.yml b/.travis.yml
index d377b5d..ffdb3d8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -74,7 +74,6 @@
deploy:
provider: script
on:
- repo: osixia/openldap
all_branches: true
script: make push NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
diff --git a/Makefile b/Makefile
index 000692d..e1c79f7 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,9 @@
test:
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
+tag:
+ docker tag $(NAME):$(VERSION) $(NAME):$(VERSION)
+
tag-latest:
docker tag $(NAME):$(VERSION) $(NAME):latest
diff --git a/test/test.bats b/test/test.bats
index 984cbfb..152f8c5 100644
--- a/test/test.bats
+++ b/test/test.bats
@@ -83,13 +83,13 @@
@test "ldapsearch database with password provided from file" {
- rm $PWD/password.txt && touch $PWD/password.txt
- echo "strongPassword" >> $PWD/password.txt
+ echo "strongPassword" > $PWD/password.txt
run_image -h ldap.osixia.net -e LDAP_ADMIN_PASSWORD_FILE=/run/secrets/admin_pw.txt --volume $PWD/password.txt:/run/secrets/admin_pw.txt
wait_process slapd
run docker exec $CONTAINER_ID ldapsearch -x -h ldap.osixia.net -b dc=example,dc=org -ZZ -D "cn=admin,dc=example,dc=org" -w strongPassword
clear_container
+
rm $PWD/password.txt
[ "$status" -eq 0 ]
diff --git a/test/test_helper.bash b/test/test_helper.bash
index ebc317e..726833e 100755
--- a/test/test_helper.bash
+++ b/test/test_helper.bash
@@ -22,7 +22,7 @@
}
remove_container() {
- remove_containers_by_cid $CONTAINER_ID
+ remove_containers_by_cid $CONTAINER_ID
}
clear_container() {