1
0
mirror of synced 2026-02-13 13:06:56 +00:00

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:
Sunny
2023-07-19 17:40:01 +00:00
parent e63ddb99de
commit ab94c8064c
4 changed files with 148 additions and 33 deletions

View File

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