garm/test/integration/e2e/utils.go
Ionut Balutoiu 318bc52b57 Refactor integration E2E tests
* General cleanup of the integration tests Golang code. Move the
  `e2e.go` codebase into its own package and separate files.
* Reduce the overall log spam from the integration tests output.
* Add final GitHub workflow step that stops GARM server, and does the
  GitHub cleanup of any orphaned resources.
* Add `TODO` to implement cleanup of the orphaned GitHub webhooks.
  This is useful, if the uninstall of the webhooks failed.
* Add `TODO` for extra missing checks on the GitHub webhooks
  install / uninstall logic.

Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
2023-08-24 15:22:46 +03:00

15 lines
215 B
Go

package e2e
import (
"encoding/json"
"log"
)
func printJsonResponse(resp interface{}) error {
b, err := json.MarshalIndent(resp, "", " ")
if err != nil {
return err
}
log.Println(string(b))
return nil
}