|
@@ -83,7 +83,7 @@ Now you can run an application inside your network container.
|
|
|
|
|
|
export LD_PRELOAD=`pwd`/libzerotierintercept.so
|
|
export LD_PRELOAD=`pwd`/libzerotierintercept.so
|
|
export ZT_NC_NETWORK=/tmp/netcon-test-home/nc_8056c2e21c000001
|
|
export ZT_NC_NETWORK=/tmp/netcon-test-home/nc_8056c2e21c000001
|
|
- python -m SimpleHTTPServer
|
|
|
|
|
|
+ python -m SimpleHTTPServer 80
|
|
|
|
|
|
(If you are using Python 3, use "-m http.server".)
|
|
(If you are using Python 3, use "-m http.server".)
|
|
|
|
|
|
@@ -119,9 +119,26 @@ Results will be written to the *netcon/docker-test/_results/* directory which is
|
|
|
|
|
|
To run unit tests:
|
|
To run unit tests:
|
|
|
|
|
|
-1) Set up your own network, use its network id as follows:
|
|
|
|
|
|
+1) Set up your own network at [https://my.zerotier.com/](https://my.zerotier.com/). For our example we'll just use the Earth network (8056c2e21c000001). Use its network id as follows:
|
|
|
|
|
|
-2) Place a blank network config file in the *netcon/docker-test* directory (e.g. "e5cd7a9e1c5311ab.conf")
|
|
|
|
|
|
+2) Generate two pairs of identity keys. Each public/private pair will be used by the *netcon* and *monitor* containers:
|
|
|
|
+
|
|
|
|
+ ./zerotier-netcon-service -d -p8100 /tmp/netcon_first
|
|
|
|
+ ./zerotier-cli -D/tmp/netcon_first join 8056c2e21c000001
|
|
|
|
+
|
|
|
|
+ ./zerotier-netcon-service -d -p8101 /tmp/netcon_second
|
|
|
|
+ ./zerotier-cli -D/tmp/netcon_second join 8056c2e21c000001
|
|
|
|
+
|
|
|
|
+3) Copy the identity files to your *docker-test* directory. Names will be altered during copy step so the dockerfiles know which identities to use for each image/container:
|
|
|
|
+
|
|
|
|
+ cp /tmp/netcon_first/identity.public docker-test/netcon_identity.public
|
|
|
|
+ cp /tmp/netcon_first/identity.private docker-test/netcon_identity.private
|
|
|
|
+
|
|
|
|
+ cp /tmp/netcon_second/identity.public docker-test/monitor_identity.public
|
|
|
|
+ cp /tmp/netcon_second/identity.private docker-test/monitor_identity.private
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+4) Place a blank network config file in the *netcon/docker-test* directory (e.g. "8056c2e21c000001.conf")
|
|
- This will be used to inform test-specific scripts what network to use for testing
|
|
- This will be used to inform test-specific scripts what network to use for testing
|
|
|
|
|
|
After you've created your network and placed its blank config file in *netcon/docker-test* run the following to perform unit tests for httpd:
|
|
After you've created your network and placed its blank config file in *netcon/docker-test* run the following to perform unit tests for httpd:
|