tests/int: Add IAM setup automation docs and misc fixes
Add instructions about how to create service accounts with IAM permissions and populate the secrets and variables required in the CI. Update the panic recovery code to ensure that the exit status surfaces on panic along with a log message. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
@@ -222,14 +222,11 @@ func TestMain(m *testing.M) {
|
||||
log.Printf("Failed to stop environment: %v", err)
|
||||
}
|
||||
|
||||
// Calling exit on panic prevents logging of panic error.
|
||||
// Exit only on normal return. Explicitly detect panic and log the error
|
||||
// on panic.
|
||||
if err := recover(); err == nil {
|
||||
os.Exit(exitCode)
|
||||
} else {
|
||||
// Log the panic error before exit to surface the cause of panic.
|
||||
if err := recover(); err != nil {
|
||||
log.Printf("panic: %v", err)
|
||||
}
|
||||
os.Exit(exitCode)
|
||||
}()
|
||||
|
||||
// get terrraform infrastructure
|
||||
|
||||
Reference in New Issue
Block a user