Juan Font
52862b8a22
Port integration tests routes CLI to v2
...
Fix options signature
2022-12-06 08:17:14 +01:00
Kristoffer Dalby
7b8cf5ef1a
Add 1.34.0 to integration tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-12-05 20:41:15 +01:00
Kristoffer Dalby
6f4c6c1876
Ignore tparallel where it doesnt make sense
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-12-01 14:45:11 +01:00
Kristoffer Dalby
c02e105065
Mark the flag properly experimental
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
22da5bfc1d
Enable SSH for tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
91ed6e2197
Allow WithEnv to be passed multiple times
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
d71aef3b98
Mark all tests with Parallel
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
8a79c2e7ed
Do not retry on permission denied in ssh
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
f34e7c341b
Strip newline from hostname
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
e28d308796
Add negative tests
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Even Holthe
f610be632e
SSH: add test between namespaces
2022-11-26 11:53:31 +01:00
Even Holthe
fd6d25b5c1
SSH: Lint and typos
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
3695284286
Make simple initial test case
...
This commit makes the initial SSH test a bit simpler:
- Use the same pattern/functions for all clients as other tests
- Only test within _one_ namespace/user to confirm the base case
- Use retry function, same as taildrop, there is some funky going on
there...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
cfaa36e51a
Add method to expose container id
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-26 11:53:31 +01:00
Even Holthe
519f22f9bf
SSH integration test setup
2022-11-26 11:53:31 +01:00
Kristoffer Dalby
e7f322b9b6
Mark all tests to run in parallel
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-22 13:18:58 +01:00
Juan Font
1b0e80bb10
Add OIDC integration tests
...
* Port OIDC integration tests to v2
* Move Tailscale old versions to TS2019 list
* Remove Alpine Linux container
* Updated changelog
* Releases: use flavor to set the tag suffix
* Added more debug messages in OIDC registration
* Added more logging
* Do not strip nodekey prefix on handle expired
* Updated changelog
* Add WithHostnameAsServerURL option func
* Reduce the number of namespaces and use hsic.WithHostnameAsServerURL
* Linting fix
* Fix linting issues
* Wait for ready outside the up goroutine
* Minor change in log message
* Add prefix to env var
* Remove unused env var
Co-authored-by: Juan Font <juan.font@esa.int>
Co-authored-by: Steven Honson <steven@honson.id.au>
Co-authored-by: Kristoffer Dalby <kristoffer@dalby.cc>
2022-11-21 21:51:54 +01:00
Kristoffer Dalby
4ccc528d96
Remove some very verbose error outputs
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-21 14:37:50 +01:00
Juan Font
d461097247
Remove mTLS stuff from code
2022-11-19 19:50:34 +01:00
Juan Font
f90a3c196c
Move TS WaitForReady outside up goroutine
2022-11-19 17:16:08 +01:00
Juan Font
9269dd01f5
Move Tailscale old versions to TS2019 list
2022-11-14 23:06:30 +01:00
Kristoffer Dalby
46df219ed3
Add testname identifier to hs container
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
835288d864
Remove unused variable
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
93d56362af
Lock and unify headscale start/get method
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
4799859be0
Fix renamed method
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
8e44596171
less verbose command output
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
d479234058
Split ts versions into 2019/2021 for dedicated tests later
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
3fc5866de0
Remove duplicate function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
f3c40086ac
Make TLS setup work automatically
...
This commit injects the per-test-generated tls certs into the tailscale
container and makes sure all can ping all. It does not test any of the
DERP isolation yet.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
09ed21edd8
Remove duplicate function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
456479eaa1
Rename and move wait for headscale
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
cb87852825
Add nolint to gosec stuff that doesnt matter because test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
69440058bb
Clean up cert function
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Kristoffer Dalby
9bc6ac0f35
Make TLS setup work automatically
...
This commit injects the per-test-generated tls certs into the tailscale
container and makes sure all can ping all. It does not test any of the
DERP isolation yet.
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-14 16:50:28 +01:00
Juan Font Alonso
89ff5c83d2
Add web flow auth integration tests
2022-11-14 08:47:02 +01:00
Juan Font Alonso
0a47d694be
Return the real port of the container
2022-11-14 08:47:02 +01:00
Juan Font Alonso
a9251d6652
Fixed linter issues
2022-11-13 22:33:41 +01:00
Juan Font Alonso
f9c44f11d6
Added method to run tailscale up without authkey
2022-11-13 22:33:41 +01:00
Juan Font Alonso
1f8bd24a0d
Return stderr in tsic.Execute
2022-11-13 22:33:41 +01:00
Juan Font Alonso
7bf2eb3d71
Update Tailscale interface with new Execute signature
2022-11-13 22:33:41 +01:00
Juan Font Alonso
9989657c0f
Wait for tailscale client to be ready after tailscale up
2022-11-13 18:30:00 +01:00
Juan Font Alonso
cb2790984f
Added WaitForReady() to Tailscale interface
...
When using running `tailscale up` in the AuthKey flow process, the tailscale client immediately enters PollMap after registration - avoiding a race condition.
When using the web auth (up -> go to the Control website -> CLI `register`) the client is polling checking if it has been authorized. If we immediately ask for the client IP, as done in CreateHeadscaleEnv() we might have the client in NotReady status.
This method provides a way to wait for the client to be ready.
Signed-off-by: Juan Font Alonso <juanfontalonso@gmail.com>
2022-11-13 18:30:00 +01:00
Kristoffer Dalby
d8c856e602
Add basic accept all acl to all test as example
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
aad4c90fe6
Add options to hsic, ACL and env overrides
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
4f9fe93146
golangci-lint --fix
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
96fe6aa3a1
Remove unused func, comment out configobject way
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
947e961a3a
Write headcsale config file from code, not depend on directory
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
43731cad2e
Add helper function to add files to hs container
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
ac15b21720
Remove tab from YAML
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00
Kristoffer Dalby
dfc03a6124
Ditch stupid distroless image for debug/test
...
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2022-11-03 12:53:00 +01:00