mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
@@ -47,17 +47,13 @@ func testAdminCmd(cmd cmdType, t *testing.T) {
|
||||
}
|
||||
|
||||
go func() {
|
||||
// mocking signal receiver
|
||||
// A test signal receiver
|
||||
<-globalServiceSignalCh
|
||||
}()
|
||||
|
||||
ga := AuthRPCArgs{AuthToken: reply.AuthToken, RequestTime: time.Now().UTC()}
|
||||
genReply := AuthRPCReply{}
|
||||
switch cmd {
|
||||
case stopCmd:
|
||||
if err = adminServer.Shutdown(&ga, &genReply); err != nil {
|
||||
t.Errorf("stopCmd: Expected: <nil>, got: %v", err)
|
||||
}
|
||||
case restartCmd:
|
||||
if err = adminServer.Restart(&ga, &genReply); err != nil {
|
||||
t.Errorf("restartCmd: Expected: <nil>, got: %v", err)
|
||||
@@ -65,10 +61,6 @@ func testAdminCmd(cmd cmdType, t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAdminShutdown(t *testing.T) {
|
||||
testAdminCmd(stopCmd, t)
|
||||
}
|
||||
|
||||
func TestAdminRestart(t *testing.T) {
|
||||
testAdminCmd(restartCmd, t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user