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:
Kristoffer Dalby 2025-07-16 11:31:51 +00:00
parent fe4978764b
commit cb5c5c0621
2 changed files with 3 additions and 3 deletions

View File

@ -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 {

View File

@ -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)