Browse Source

remove add-host script

ofreax 10 years ago
parent
commit
1582e1c49b
2 changed files with 4 additions and 5 deletions
  1. 2 3
      README.md
  2. 2 2
      test/test.bats

+ 2 - 3
README.md

@@ -121,9 +121,8 @@ Quick example, with the default config.
 
 	#Add the pair "ip hostname" to /etc/hosts on each containers,
 	#beacause ldap.example.org and ldap2.example.org are fake hostnames
-	docker exec $LDAP_CID /sbin/add-host $LDAP2_IP ldap2.example.org
-	docker exec $LDAP2_CID /sbin/add-host $LDAP_IP ldap.example.org
-
+	docker exec $LDAP_CID bash -c "echo $LDAP2_IP ldap2.example.org >> /etc/hosts"
+	docker exec $LDAP2_CID bash -c "echo $LDAP_IP ldap.example.org >> /etc/hosts"
 
 That's it ! But a litle test to be sure :
 

+ 2 - 2
test/test.bats

@@ -71,8 +71,8 @@ load test_helper
   run_image -h ldap.example.org -e LDAP_REPLICATION=true -e IS_REPLICATION_TEST=true
 
   # add route to hosts
-  docker exec $LDAP_REPL_CID /sbin/add-host $CONTAINER_IP ldap.example.org
-  docker exec $CONTAINER_ID /sbin/add-host $LDAP_REPL_IP ldap2.example.org
+  docker exec $LDAP_CID bash -c "echo $LDAP2_IP ldap2.example.org >> /etc/hosts"
+	docker exec $LDAP2_CID bash -c "echo $LDAP_IP ldap.example.org >> /etc/hosts"
 
   # wait services on both servers
   wait_service slapd