diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2019-04-09 10:07:30 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2019-04-11 13:35:48 +0200 |
commit | 44982c775edcba6fc9eed156da584cdd324a3029 (patch) | |
tree | 035cd24c69e362eb493c8f970013b1a127285ef4 /client/options_test.go | |
parent | 6d18c6a0629581ba35286fc04d6a8462ad20883a (diff) | |
download | docker-44982c775edcba6fc9eed156da584cdd324a3029.tar.gz |
Add client.WithTimeout() option
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'client/options_test.go')
-rw-r--r-- | client/options_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/client/options_test.go b/client/options_test.go new file mode 100644 index 0000000000..a0e0b07913 --- /dev/null +++ b/client/options_test.go @@ -0,0 +1,16 @@ +package client + +import ( + "testing" + "time" + + "gotest.tools/assert" +) + +func TestOptionWithTimeout(t *testing.T) { + timeout := 10 * time.Second + c, err := NewClientWithOpts(WithTimeout(timeout)) + assert.NilError(t, err) + assert.Check(t, c.client != nil) + assert.Equal(t, c.client.Timeout, timeout) +} |