2b2b5200eb
This also removes server process termination logic when a server is breaching the output limits. It simply continues to efficiently throttle the console output.
23 lines
445 B
Go
23 lines
445 B
Go
package server
|
|
|
|
import (
|
|
"testing"
|
|
|
|
. "github.com/franela/goblin"
|
|
"github.com/pterodactyl/wings/system"
|
|
)
|
|
|
|
func TestPower(t *testing.T) {
|
|
g := Goblin(t)
|
|
|
|
g.Describe("Server#ExecutingPowerAction", func() {
|
|
g.It("should return based on locker status", func() {
|
|
s := &Server{powerLock: system.NewLocker()}
|
|
|
|
g.Assert(s.ExecutingPowerAction()).IsFalse()
|
|
s.powerLock.Acquire()
|
|
g.Assert(s.ExecutingPowerAction()).IsTrue()
|
|
})
|
|
})
|
|
}
|