summaryrefslogtreecommitdiff
path: root/client/options_test.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2019-04-09 10:07:30 +0200
committerSebastiaan van Stijn <github@gone.nl>2019-04-11 13:35:48 +0200
commit44982c775edcba6fc9eed156da584cdd324a3029 (patch)
tree035cd24c69e362eb493c8f970013b1a127285ef4 /client/options_test.go
parent6d18c6a0629581ba35286fc04d6a8462ad20883a (diff)
downloaddocker-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.go16
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)
+}