Browse Source

Test need a more recent version of NodeJS so update Dockerfile.

Adam Ierymenko 9 years ago
parent
commit
1f5ef968cf
4 changed files with 12 additions and 2 deletions
  1. 2 1
      tests/http/Dockerfile
  2. 1 1
      tests/http/agent.js
  3. 3 0
      tests/http/docker-main.sh
  4. 6 0
      tests/http/nodesource-el.repo

+ 2 - 1
tests/http/Dockerfile

@@ -4,7 +4,8 @@ MAINTAINER https://www.zerotier.com/
 
 EXPOSE 9993/udp
 
-RUN yum -y update && yum -y install epel-release && yum -y install nodejs npm && yum clean all
+ADD nodesource-el.repo /etc/yum.repos.d/nodesource-el.repo
+RUN yum -y update && yum install -y nodejs && yum clean all
 
 RUN mkdir -p /var/lib/zerotier-one
 RUN mkdir -p /var/lib/zerotier-one/networks.d

+ 1 - 1
tests/http/agent.js

@@ -211,7 +211,7 @@ app.get('/',function(req,res) {
 	return res.status(200).send(payload);
 });
 
-var expressServer = app.listen(AGENT_PORT,agentIdToIp(thisAgentId),function () {
+var expressServer = app.listen(AGENT_PORT,function () {
 	registerAndGetPeers(function(err,peers) {
 		if (err) {
 			console.error('FATAL: unable to contact or query server: '+err.toString());

+ 3 - 0
tests/http/docker-main.sh

@@ -8,4 +8,7 @@ while [ ! -d "/proc/sys/net/ipv6/conf/zt0" ]; do
 	sleep 0.25
 done
 
+sleep 2
+
 exec node --harmony /agent.js >>agent.out 2>&1
+#exec node --harmony /agent.js

+ 6 - 0
tests/http/nodesource-el.repo

@@ -0,0 +1,6 @@
+[nodesource]
+name=Node.js Packages for Enterprise Linux 7 - $basearch
+baseurl=https://rpm.nodesource.com/pub_4.x/el/7/$basearch
+failovermethod=priority
+enabled=1
+gpgcheck=0