summaryrefslogtreecommitdiff
path: root/config_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'config_test.go')
-rw-r--r--config_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/config_test.go b/config_test.go
index 89cde8f1..e51cb2c4 100644
--- a/config_test.go
+++ b/config_test.go
@@ -17,6 +17,17 @@ func Test_NumWorkers(t *testing.T) {
assert.Equal(t, "pool.NumWorkers must be set", err.Error())
}
+func Test_NumWorkers_Default(t *testing.T) {
+ cfg := Config{
+ AllocateTimeout: time.Second,
+ DestroyTimeout: time.Second * 10,
+ }
+
+ assert.NoError(t, cfg.InitDefaults())
+ err := cfg.Valid()
+ assert.Nil(t, err)
+}
+
func Test_AllocateTimeout(t *testing.T) {
cfg := Config{
NumWorkers: 10,