aboutsummaryrefslogtreecommitdiff
path: root/tests/zt.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-10-09 17:12:00 -0700
committerGarrett D'Amore <garrett@damore.org>2017-10-10 11:23:45 -0700
commitf750542b20acec2cf78b8e00dce9aeb9d98572a2 (patch)
treed6d1d958caadcb3634eb893d7b6a5f9bed09eb14 /tests/zt.c
parentf14cdb705cc11f39a4702c28f22007ffaaf7c9e1 (diff)
downloadnng-f750542b20acec2cf78b8e00dce9aeb9d98572a2.tar.gz
nng-f750542b20acec2cf78b8e00dce9aeb9d98572a2.tar.bz2
nng-f750542b20acec2cf78b8e00dce9aeb9d98572a2.zip
fixes #92 Support ZT federations (moons)
This also fixes a fence post error in the ephemeral state handling .
Diffstat (limited to 'tests/zt.c')
-rw-r--r--tests/zt.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/zt.c b/tests/zt.c
index ee6bf9cc..9e6557bc 100644
--- a/tests/zt.c
+++ b/tests/zt.c
@@ -214,7 +214,22 @@ TestMain("ZeroTier Transport", {
strlen(path1) + 1) == 0);
So(nng_listener_start(l, 0) == 0);
- })
+
+ Convey("And we can orbit a moon", {
+ uint64_t ids[2];
+ // Provided by Janjaap...
+ ids[0] = 0x622514484aull;
+ ids[1] = 0x622514484aull;
+
+ So(nng_listener_setopt(l, NNG_OPT_ZT_ORBIT, ids, sizeof (ids)) == 0);
+
+ });
+ Convey("And we can deorbit anything", {
+ uint64_t id;
+ id = 0x12345678;
+ So(nng_listener_setopt(l, NNG_OPT_ZT_DEORBIT, &id, sizeof (id)) == 0);
+ });
+ });
});
Convey("We can create a zt dialer", {