From 37b3cd421fcad5513f22a27983167895f4a6cc8d Mon Sep 17 00:00:00 2001
From: liaoqingwei <liaoqingwei@huawei.com>
Date: Tue, 20 Oct 2015 13:38:55 +0800
Subject: [PATCH] Use of checkers on docker_cli_info_test.go.

Signed-off-by: liaoqingwei <liaoqingwei@huawei.com>
---
 integration-cli/docker_cli_info_test.go | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/integration-cli/docker_cli_info_test.go b/integration-cli/docker_cli_info_test.go
index c886619efb..9a61449ced 100644
--- a/integration-cli/docker_cli_info_test.go
+++ b/integration-cli/docker_cli_info_test.go
@@ -2,7 +2,6 @@ package main
 
 import (
 	"fmt"
-	"strings"
 
 	"github.com/docker/docker/pkg/integration/checker"
 	"github.com/docker/docker/utils"
@@ -32,9 +31,7 @@ func (s *DockerSuite) TestInfoEnsureSucceeds(c *check.C) {
 	}
 
 	for _, linePrefix := range stringsToCheck {
-		if !strings.Contains(out, linePrefix) {
-			c.Errorf("couldn't find string %v in output", linePrefix)
-		}
+		c.Assert(out, checker.Contains, linePrefix, check.Commentf("couldn't find string %v in output", linePrefix))
 	}
 }
 
@@ -45,9 +42,8 @@ func (s *DockerSuite) TestInfoDiscoveryBackend(c *check.C) {
 
 	d := NewDaemon(c)
 	discoveryBackend := "consul://consuladdr:consulport/some/path"
-	if err := d.Start(fmt.Sprintf("--cluster-store=%s", discoveryBackend), "--cluster-advertise=foo"); err != nil {
-		c.Fatal(err)
-	}
+	err := d.Start(fmt.Sprintf("--cluster-store=%s", discoveryBackend), "--cluster-advertise=foo")
+	c.Assert(err, checker.IsNil)
 	defer d.Stop()
 
 	out, err := d.Cmd("info")