This fixes the make tasks and adds a new Dockerfile to build the package
properly for ubuntu 22.04 (and derivatives) and up. The packages require
libssl3.
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
This commit reorganizes the tree to make it easier to test individual
library functionality within it. Notably it:
- Moves everything under a library
- Moves zeronsd to the `src/bin` directory, with a small boot stub
- Moves the integration tests to `tests/`, with the service abstraction
+ library tooling for the tests in one spot.
- It also rewrites significant parts of the testing functionality to use
tokio::test, with all the async functionality that needed to change to
go along with that.
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
This also includes several traits and file organization structuring to
make things a little easier to work with when adding future tests.
rfc4193 and sixplane are tested as well as ipv4 now.
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
The entrypoint was not being set correctly, resulting in broken
behavior. Thanks to @jmuchovej for triaging this problem.
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
Also: integration test restructuring
This implements an integration test harness for zerotier-one that joins
and leaves networks it creates. It also removes the need for passing the
token if you have provided a `test-token.txt` in the root of the
repository.
- Right now, the serial is bumped N times for every API call, which is
really not great when you consider that systemd-networkd and others
like it are caching name resolvers.
- This can be elided by checking if a matching record exists in the
catalog before inserting it.
- Tests were added. Fixtures in some spots were created. Read
`src/tests.rs` before trying tests.
- Code was heavily reorganized as a result.
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
This generates .deb, .rpm, and docker images.
To package, type `make package` which will build all three.
You can also test the package installation and usage by typing `make
test-package`, but admittedly these tests are quite primitive.
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>
This allows the service to autoconfigure itself based on the zerotier
network information the local zerotier-one client provides. It will
automatically listen on the proper IP address, as well as configure dns
through the central API to use it.
Signed-off-by: Erik Hollensbe <linux@hollensbe.org>