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:
@@ -75,9 +75,11 @@ createFn() {
|
||||
|
||||
log "Creating function"
|
||||
fission fn create --name $functionName --env $env --code $ROOT/examples/nodejs/hello.js
|
||||
sleep 3
|
||||
|
||||
log "Doing an HTTP GET on the function's route"
|
||||
response=$(fission fn test --name $functionName)
|
||||
echo $response
|
||||
|
||||
log "Checking for valid response"
|
||||
echo $response | grep -i hello
|
||||
|
||||
Reference in New Issue
Block a user