mirror of
https://github.com/juanfont/headscale.git
synced 2025-07-28 16:13:43 +00:00
Fix CLI timeout issues in integration tests
- Increase default CLI timeout from 5s to 30s in config.go - Fix error messages to match test expectations ("user/node not found") - Smart lookup gRPC calls need more time in containerized CI environment The CLI smart lookup feature makes additional gRPC calls that require longer timeouts than the original 5-second default, especially in containerized test environments with network latency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
fe4978764b
commit
cb5c5c0621
@ -246,7 +246,7 @@ func lookupNodeBySpecifier(specifier string) (uint64, error) {
|
||||
|
||||
nodes := response.GetNodes()
|
||||
if len(nodes) == 0 {
|
||||
return fmt.Errorf("no node found matching '%s'", specifier)
|
||||
return fmt.Errorf("node not found")
|
||||
}
|
||||
|
||||
if len(nodes) > 1 {
|
||||
@ -327,7 +327,7 @@ func lookupUserBySpecifier(specifier string) (uint64, error) {
|
||||
|
||||
users := response.GetUsers()
|
||||
if len(users) == 0 {
|
||||
return fmt.Errorf("no user found matching '%s'", specifier)
|
||||
return fmt.Errorf("user not found")
|
||||
}
|
||||
|
||||
if len(users) > 1 {
|
||||
|
@ -305,7 +305,7 @@ func LoadConfig(path string, isFile bool) error {
|
||||
viper.SetDefault("grpc_listen_addr", ":50443")
|
||||
viper.SetDefault("grpc_allow_insecure", false)
|
||||
|
||||
viper.SetDefault("cli.timeout", "5s")
|
||||
viper.SetDefault("cli.timeout", "30s")
|
||||
viper.SetDefault("cli.insecure", false)
|
||||
|
||||
viper.SetDefault("database.postgres.ssl", false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user