26 lines
402 B
Go
26 lines
402 B
Go
package throttling
|
|
|
|
import (
|
|
"github.com/stretchr/testify/suite"
|
|
"testing"
|
|
)
|
|
|
|
type ThrottlerTestSuite struct {
|
|
suite.Suite
|
|
|
|
oldclock _clock
|
|
}
|
|
|
|
func (suite *ThrottlerTestSuite) SetupTest() {
|
|
suite.oldclock = clock
|
|
clock = currentTime
|
|
}
|
|
|
|
func (suite *ThrottlerTestSuite) TearDownTest() {
|
|
clock = suite.oldclock
|
|
}
|
|
|
|
func TestThrottlerTestSuite(t *testing.T) {
|
|
suite.Run(t, &ThrottlerTestSuite{})
|
|
}
|