Integration Test: Create Service Account (#1725)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2022-03-17 12:15:06 -07:00
committed by GitHub
parent 39453de8fb
commit d7626e187c
9 changed files with 295 additions and 149 deletions

View File

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