Commit Graph

12 Commits

Author SHA1 Message Date
Kristoffer Dalby
6369cea10e Remove golint, its deprecated
This commit removed `golint`, its deprecated:
https://github.com/golang/lint

and golangci-lint has overlapping features.
2021-10-27 06:58:16 +00:00
Kristoffer Dalby
2d92719095 Dont try to generate code on every make build 2021-10-27 06:48:30 +00:00
Kristoffer Dalby
8f2ef6a57d Prepare for checking in generated code 2021-10-27 06:40:39 +00:00
Kristoffer Dalby
b8c89cd63c Add readme and makefile entry about code generation 2021-10-26 20:53:10 +00:00
Juan Font Alonso
2048e9e136 Added version checker on startup 2021-09-27 16:26:18 +02:00
Juan Font
acc43c39af Increased linter timeout in makefile 2021-09-13 22:58:35 +02:00
Aaron Bieber
104776ee84 fix setting of version 2021-08-24 07:49:15 -06:00
Kristoffer Dalby
0e1ddf9715
Set longer timeout for integration tests 2021-08-12 07:36:38 +01:00
Kristoffer Dalby
4e077b053c Initial work, add integration tests
This commit adds integration tests to headscale. They are currently
quite simple, but it lays the groundwork for more comprehensive testing
and ensuring we dont break things with the official tailscale client.

The test works by leveraging Docker (via dockertest) to spin up a
Headscale container, and a number of tailscale containers (10).

Each tailscale container is joined to the headscale and then "passed on"
to the tests.

Currently three tests have been implemented:

- Have all tailscale containers join headscale (in the setup process)
- Get IP from each container (I plan to extend this with cross-ping)
- List nodes with headscales CLI and verify all has been registered

This test depends on Docker, and currently, I have not looked into
hooking it into Github Actions.
2021-08-08 17:50:32 +01:00
Ward Vandewege
b34e90c45d Fix bug in preauthkeys: namespace object was not populated in the return
value from CreatePreAuthKey and GetPreAuthKeys. Add tests for that bug,
and the rest of the preauthkeys functionality.

Fix path in `compress` Makefile target.
2021-05-02 14:58:05 -04:00
Ward Vandewege
37601f6b4d Add a very simple test. 2021-04-26 19:22:28 -04:00
Ward Vandewege
6aedc1111b Add a Makefile with a few targets. The default is 'build'. The build
target calls the new version-at-commit.sh script which will
automatically populate the version variable inside the Headscale binary.

Once we start tagging releases on the git tree, that will come in handy.

The Makefile also has a 'test' target (does nothing yet, no tests yet)
and a 'dev' target, which runs linters, tests, and finally builds.
2021-04-25 10:31:52 -04:00