Files
object-browser/restapi/user_logout_test.go
Lenin Alevski ff2438a877 Logout endpoint (#47)
Delete in memory session when user logout from mcs

lint fixes

Click logout button triggers logout request

Clicking the actual logout button send the POST /logout request on mcs
UI

Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
2020-04-08 14:36:14 -05:00

22 lines
504 B
Go

package restapi
import (
"testing"
mcCmd "github.com/minio/mc/cmd"
"github.com/minio/mcs/restapi/sessions"
)
// TestLogout tests the case of deleting a valid session id
func TestLogout(t *testing.T) {
cfg := mcCmd.Config{}
// Creating a new session
sessionID := sessions.GetInstance().NewSession(&cfg)
// Test Case 1: Delete a session Valid sessionID
function := "logout()"
err := logout(sessionID)
if err != nil {
t.Errorf("Failed on %s:, error occurred: %s", function, err.Error())
}
}