open-nomad/drivers
Mahmood Ali 8923ea4663 Handle time.Duration in mock
Mock driver config uses `time.Duration` fields but we initialize them
inconsistently, as time.Duration sometimes and as duration strings other
times.  Previously, `mapstructure` handles it and does the right thing.

This is no longer the case with MsgPack.  I could not find a good way to
bring back old behavior without too much complexity.  `MsgPack` extended
types weren't ideal here as we lose type information (e.g. int64 vs
string), and the input is a generic map and not a MsgPack serialization
of duration.

As such, I went with the simple solution of declaring the config field
as duration string, and panicing if the test doesn't pass a valid
string.

I found this to cause the smallest change in tests, but we can
alternatively force all to be int64 instead.
2018-11-13 10:21:40 -05:00
..
docker/docklog Device manager 2018-11-07 10:43:15 -08:00
exec handle nil resources limits 2018-11-09 15:52:44 -05:00
java distinguish java driver tests from others 2018-11-13 10:21:40 -05:00
mock Handle time.Duration in mock 2018-11-13 10:21:40 -05:00
qemu Device manager 2018-11-07 10:43:15 -08:00
rawexec Merge pull request #4845 from hashicorp/r-exec-refactor 2018-11-12 20:59:32 -05:00
rkt Device manager 2018-11-07 10:43:15 -08:00
shared/eventer drivers/shared: added func comment to eventer 2018-10-16 16:56:55 -07:00