Commit Graph

44 Commits

Author SHA1 Message Date
Kristoffer Dalby 4df47de3f2
add nolint to integrationtests, they are going away ™️
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-18 14:57:22 +02:00
Kristoffer Dalby dfadb965b7
Use short test to signal that we dont run integration
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-18 14:45:18 +02:00
Kristoffer Dalby c6f82c3646
Switch from hacking buildtags to selecting tests
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-18 14:41:48 +02:00
Kristoffer Dalby 8ee35c9c22
Stuff
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-07 23:56:27 +02:00
Kristoffer Dalby a846e13c78
Expose and use ports consistently
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-10-07 23:56:27 +02:00
Juan Font 09863b540d
Merge branch 'main' into preauthkey-tags 2022-09-21 18:03:35 +02:00
Juan Font 695359862e Return stderr too in ExecuteCommand 2022-09-21 15:01:26 +00:00
Benjamin George Roberts 8a8ec7476d fix linting issues in preauthkey tags 2022-09-08 09:03:38 +10:00
Benjamin George Roberts 72a43007d8 fix broken preauth-key tag test 2022-09-05 09:44:55 +10:00
Benjamin George Roberts ac18723dd4 Set tags as part of handleAuthKeyCommon 2022-08-25 22:26:04 +10:00
Jiang Zhu 81f91f03b4 add env var to specify config location 2022-08-21 23:51:04 +08:00
Adrien Raffin-Caboisse 110b01befa Merge remote-tracking branch 'origin/main' into fix-bug-in-excludecorrectlytaggednodes 2022-08-11 12:49:26 +02:00
Juan Font Alonso f8986132d4 Use tags to split the integration tests 2022-08-09 12:26:12 +02:00
Juan Font Alonso a6113066ff Improved logs in integration tests 2022-08-05 17:35:28 +02:00
Adrien Raffin-Caboisse 79688e6187
chore(all): apply formater 2022-08-04 10:47:00 +02:00
Adrien Raffin-Caboisse c90e862460
fix(grpc): add more checks for tag validation 2022-07-25 14:01:41 +02:00
Kristoffer Dalby 566b8c3df3 Fix issue were dockertest fails to start because of container mismatch 2022-06-27 12:07:30 +00:00
Kristoffer Dalby 3777de7133 Use failnow for cli tests aswell 2022-06-27 12:00:21 +00:00
Jiang Zhu ce13596077 add integration test for headscale -c 2022-06-05 23:13:58 +08:00
Kristoffer Dalby 0676aa11a9
Merge branch 'main' into db-error-handling 2022-05-31 10:18:13 +02:00
Kristoffer Dalby 5ecfbbaf5d Fix pointer in machine save call 2022-05-31 10:05:00 +02:00
Kristoffer Dalby e631c6f7e0 Merge master 2022-05-16 21:41:46 +02:00
Kristoffer Dalby 9b393eb861 Add integration cli tests for rename command 2022-05-16 20:32:56 +02:00
Kristoffer Dalby a28eebfca3
Merge branch 'main' into feat-list-tags-of-machines 2022-05-15 12:11:28 +01:00
Adrien Raffin-Caboisse b511295349
fix: integration tests result
Execute command doesn't fail, the result is passed in json content.
2022-05-13 13:02:40 +02:00
Adrien Raffin-Caboisse 49ec9943b9
fix: loop over result machines instead of startup machines 2022-05-13 12:14:11 +02:00
Adrien Raffin-Caboisse 31c0062d5e
feat: add integration tests for tag support 2022-05-13 11:47:22 +02:00
Samuel Lock c26280c331 modified code to satisfy golangci-lint and added integration test 2022-05-11 09:31:24 +10:00
Igor Perepilitsyn b9ea83fed8 check that new command does not break nodes list output 2022-05-02 15:04:24 +04:00
Igor Perepilitsyn e279224484 add integrations tests 2022-05-02 14:00:09 +04:00
Juan Font Alonso a1caa5b45c Minor improvements on logging 2022-03-20 12:31:18 +01:00
Kristoffer Dalby e7bef56718 Remove reference to registered in integration test 2022-02-28 16:36:29 +00:00
Kristoffer Dalby 9ceac5c0fc Remove CLI and tests for Shared node 2022-02-21 22:44:08 +00:00
Kristoffer Dalby e8e573de62 Add apikeys command integration test 2022-01-25 22:11:15 +00:00
Kristoffer Dalby ef81845deb
Merge branch 'main' into kradalby-patch-2 2021-11-27 20:30:27 +00:00
Kristoffer Dalby d96b681c83 Fix node cli integration test 2021-11-27 20:25:37 +00:00
Kristoffer Dalby c38f00fab8 Unmarshal keys in the non-deprecated way 2021-11-26 23:50:42 +00:00
Ward Vandewege c7f3e0632b When creating a preauthkey, the default expiration was passed through as
a nil value, instead of the default value (1h). This resulted in the
preauthkey being created with expiration key '0001-01-01 00:00:00',
which meant the key would not work, because it was already expired.

This commit applies the default expiration time (1h) when a preauthkey
is created without a specific expiration. It also updates an integration
test to make sure this bug does not reoccur.
2021-11-26 10:04:26 -05:00
Kristoffer Dalby a2b9f3bede Add expire (logout) machine command 2021-11-21 13:40:44 +00:00
Kristoffer Dalby ba084b9987
Lint fix integration tests 2021-11-14 18:35:49 +01:00
Kristoffer Dalby 03b7ec62ca Go format with shorter lines 2021-11-13 08:36:45 +00:00
Kristoffer Dalby 0803c407a9 Fix Reusable typo, add tests for Augustines scenario 2021-11-08 20:49:03 +00:00
Kristoffer Dalby dce6b8d72e Add test case and fix nil pointer in preauthkeys command without expiration 2021-11-08 08:02:01 +00:00
Kristoffer Dalby 204f99dd51 Add CLI integration tests
This PR adds a new part to the integration test suite which spins up a
new headscale and runs through a scenario of test cases for each
command.

The intent is to check that all commands work as intended and produce
the expected output.

I think they have been pretty well covered, but would appreciate
additional test cases if I have missed some.

Please note: headscale is set up, and teared down for _each_ "test
function" in this file, this means that its more suitable for specific
cases.
2021-11-04 22:45:15 +00:00