Browse code

TestIpcModeOlderClient: skip if client < 1.40

This test case requires not just daemon >= 1.40, but also
client API >= 1.40. In case older client is used, we'll
get failure from the very first check:

> ipcmode_linux_test.go:313: assertion failed: shareable (string) != private (string)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1ada1c83914dd4694570cf2ea1ce240bb4a8d183)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Kir Kolyshkin authored on 2019/04/26 10:48:23
Showing 1 changed files
... ...
@@ -300,12 +300,14 @@ func TestDaemonIpcModeShareableFromConfig(t *testing.T) {
300 300
 // by default, even when the daemon default is private.
301 301
 func TestIpcModeOlderClient(t *testing.T) {
302 302
 	skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.40"), "requires a daemon with DefaultIpcMode: private")
303
+	c := testEnv.APIClient()
304
+	skip.If(t, versions.LessThan(c.ClientVersion(), "1.40"), "requires client API >= 1.40")
305
+
303 306
 	t.Parallel()
304 307
 
305 308
 	ctx := context.Background()
306 309
 
307 310
 	// pre-check: default ipc mode in daemon is private
308
-	c := testEnv.APIClient()
309 311
 	cID := container.Create(t, ctx, c, container.WithAutoRemove)
310 312
 
311 313
 	inspect, err := c.ContainerInspect(ctx, cID)