Fix fn test failed to query logs from log database (#1401)
When `fn test` failed to retrieve logs from the function pod, it turns to query logs from the log database. However, the logdb type flag is not set to `fn test`, hence the logdb type is empty (even without default value) and cause `fn logs` returns an error due to unable to find the corresponding log database type. This PR adds logdb type flag to `fn test` to resolve the problem.
This commit is contained in:
@@ -73,7 +73,7 @@ func (opts *LogSubCommand) do(input cli.Input) error {
|
||||
// request the controller to establish a proxy server to the database.
|
||||
logDB, err := logdb.GetLogDB(dbType, server)
|
||||
if err != nil {
|
||||
return errors.New("failed to connect log database")
|
||||
return errors.Wrapf(err, "failed to get log database")
|
||||
}
|
||||
|
||||
requestChan := make(chan struct{})
|
||||
|
||||
Reference in New Issue
Block a user