mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
Integration Test: Create Service Account (#1725)
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -55,37 +55,6 @@ func inspectHTTPResponse(httpResponse *http.Response) string {
|
||||
return "Http Response: " + string(b)
|
||||
}
|
||||
|
||||
func printMessage(message string) {
|
||||
/*
|
||||
Helper function to print HTTP response.
|
||||
*/
|
||||
fmt.Println(message)
|
||||
}
|
||||
|
||||
func printLoggingMessage(message string, functionName string) {
|
||||
/*
|
||||
Helper function to have standard output across the tests.
|
||||
*/
|
||||
finalString := "......................." + functionName + "(): " + message
|
||||
printMessage(finalString)
|
||||
}
|
||||
|
||||
func printStartFunc(functionName string) {
|
||||
/*
|
||||
Common function for all tests to tell that test has started
|
||||
*/
|
||||
printMessage("")
|
||||
printLoggingMessage("started", functionName)
|
||||
}
|
||||
|
||||
func printEndFunc(functionName string) {
|
||||
/*
|
||||
Helper function for all tests to tell that test has ended, is completed
|
||||
*/
|
||||
printLoggingMessage("completed", functionName)
|
||||
printMessage("")
|
||||
}
|
||||
|
||||
func initConsoleServer() (*restapi.Server, error) {
|
||||
|
||||
//os.Setenv("CONSOLE_MINIO_SERVER", "localhost:9000")
|
||||
@@ -123,7 +92,7 @@ func initConsoleServer() (*restapi.Server, error) {
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
printStartFunc("TestMain")
|
||||
|
||||
// start console server
|
||||
go func() {
|
||||
fmt.Println("start server")
|
||||
@@ -212,6 +181,6 @@ func TestMain(m *testing.M) {
|
||||
if response != nil {
|
||||
fmt.Println("DELETE StatusCode:", response.StatusCode)
|
||||
}
|
||||
printEndFunc("TestMain")
|
||||
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user