#1193 Expose constructor of MapInputSource type
This commit is contained in:
@@ -6,14 +6,13 @@ import (
|
||||
)
|
||||
|
||||
func TestMapDuration(t *testing.T) {
|
||||
inputSource := &MapInputSource{
|
||||
file: "test",
|
||||
valueMap: map[interface{}]interface{}{
|
||||
inputSource := NewMapInputSource(
|
||||
"test",
|
||||
map[interface{}]interface{}{
|
||||
"duration_of_duration_type": time.Minute,
|
||||
"duration_of_string_type": "1m",
|
||||
"duration_of_int_type": 1000,
|
||||
},
|
||||
}
|
||||
})
|
||||
d, err := inputSource.Duration("duration_of_duration_type")
|
||||
expect(t, time.Minute, d)
|
||||
expect(t, nil, err)
|
||||
|
||||
Reference in New Issue
Block a user