tests should actually try to connect to the peer
thefinn93 opened this issue · 9 comments
Right now we don't do much beyond validate the JSON structure. Tests should actually run cjdns, insert the peer, then verify that the connection succeeded via peerStats. It could also attempt to reach known nodes on Hyperboria to verify that the peer is connected to Hyperboria
Can we have Travic-CI build CJDNS, then putting in the node via a npm manager? (cjdmaid hates me.) If we do that, some nodes may go off-line at anytime. If someone shuts down the server forgetting that CJDNS is running, what happens? That is hyperboria for you....
If we really wanted to... We could have an online status that checks if a particular peer is up by pinging it.
Yes, we can and someone should go and write the scripting around that. You may have issues binding to the tun device, but you should be able to get cjdns to just check if the peering came up without that.
Okay, go for it. This ticket represents the need to have it done in CI. Maybe start there?
Alright.... How do I insert the peer into /etc/cjdroute.conf ???
We have to determine if the peer is IPV6 or IPv4 and then slot it into the correct place, do systemctl restart cjdns
then test the connection, wipe the /etc/cjdroute.conf
and repeat.
That's one way. I would suggest starting a cjdns instance with no peers and no tun device configured, then adding the peer via the RPC interface, then use the RPC interface to check if it's connected.
Some files have multiple IPs. Should I seperate the peers? what should I do?
Yeah, test each peer individually