Răsfoiți Sursa

fix travis config & tests

Bertrand Gouny 6 ani în urmă
părinte
comite
12fae7e6f4
4 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 0 1
      .travis.yml
  2. 3 0
      Makefile
  3. 2 2
      test/test.bats
  4. 1 1
      test/test_helper.bash

+ 0 - 1
.travis.yml

@@ -74,7 +74,6 @@ before_deploy:
 deploy:
   provider: script
   on:
-    repo: osixia/openldap
     all_branches: true
   script: make push NAME=${NAME} VERSION=${VERSION}-${TARGET_ARCH}
 

+ 3 - 0
Makefile

@@ -12,6 +12,9 @@ build-nocache:
 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
 

+ 2 - 2
test/test.bats

@@ -83,13 +83,13 @@ load test_helper
 
 @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 ]

+ 1 - 1
test/test_helper.bash

@@ -22,7 +22,7 @@ stop_container() {
 }
 
 remove_container() {
- remove_containers_by_cid $CONTAINER_ID
+  remove_containers_by_cid $CONTAINER_ID
 }
 
 clear_container() {