Move dircache, oauthutil, rest and pacer modules into lib

This commit is contained in:
Nick Craig-Wood
2018-01-12 17:07:38 +00:00
parent b8b620f5c2
commit 60afda007b
30 changed files with 35 additions and 35 deletions
+16
View File
@@ -0,0 +1,16 @@
package pacer
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestTokenDispenser(t *testing.T) {
td := NewTokenDispenser(5)
assert.Equal(t, 5, len(td.tokens))
td.Get()
assert.Equal(t, 4, len(td.tokens))
td.Put()
assert.Equal(t, 5, len(td.tokens))
}