mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-04 04:34:07 +09:00
integration: add SSH check mode tests
Add ReadLog method to headscale integration container for log inspection. Split SSH check mode tests into CLI and OIDC variants and add comprehensive test coverage: - TestSSHOneUserToOneCheckModeCLI: basic check mode with CLI approval - TestSSHOneUserToOneCheckModeOIDC: check mode with OIDC approval - TestSSHCheckModeUnapprovedTimeout: rejection on cache expiry - TestSSHCheckModeCheckPeriodCLI: session expiry and re-auth - TestSSHCheckModeAutoApprove: auto-approval within check period - TestSSHCheckModeNegativeCLI: explicit rejection via CLI Update existing integration tests to use headscale auth register. Updates #1850
This commit is contained in:
1 parent
7bab8da366
commit
3db0a483ed
8 files changed
+674
-57
No files matched your search
+12
-12
@@ -1100,11 +1100,11 @@ func TestNodeCommand(t *testing.T) {
|
||||
headscale,
|
||||
[]string{
|
||||
"headscale",
|
||||
"nodes",
|
||||
"auth",
|
||||
"register",
|
||||
"--user",
|
||||
"node-user",
|
||||
"register",
|
||||
"--key",
|
||||
"--auth-id",
|
||||
regID,
|
||||
"--output",
|
||||
"json",
|
||||
@@ -1185,11 +1185,11 @@ func TestNodeCommand(t *testing.T) {
|
||||
headscale,
|
||||
[]string{
|
||||
"headscale",
|
||||
"nodes",
|
||||
"auth",
|
||||
"register",
|
||||
"--user",
|
||||
"other-user",
|
||||
"register",
|
||||
"--key",
|
||||
"--auth-id",
|
||||
regID,
|
||||
"--output",
|
||||
"json",
|
||||
@@ -1359,11 +1359,11 @@ func TestNodeExpireCommand(t *testing.T) {
|
||||
headscale,
|
||||
[]string{
|
||||
"headscale",
|
||||
"nodes",
|
||||
"auth",
|
||||
"register",
|
||||
"--user",
|
||||
"node-expire-user",
|
||||
"register",
|
||||
"--key",
|
||||
"--auth-id",
|
||||
regID,
|
||||
"--output",
|
||||
"json",
|
||||
@@ -1496,11 +1496,11 @@ func TestNodeRenameCommand(t *testing.T) {
|
||||
headscale,
|
||||
[]string{
|
||||
"headscale",
|
||||
"nodes",
|
||||
"auth",
|
||||
"register",
|
||||
"--user",
|
||||
"node-rename-command",
|
||||
"register",
|
||||
"--key",
|
||||
"--auth-id",
|
||||
regID,
|
||||
"--output",
|
||||
"json",
|
||||
|
||||
Reference in new issue
Block a user