Browse code

Fix lint errors.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Daniel Nephin authored on 2017/09/02 04:07:06
Showing 3 changed files
... ...
@@ -8,6 +8,9 @@
8 8
     "api/types/container/container_.*",
9 9
     "integration-cli/"
10 10
   ],
11
+  "Skip": [
12
+    "integration-cli/"
13
+  ],
11 14
 
12 15
   "Enable": [
13 16
     "deadcode",
... ...
@@ -41,7 +41,7 @@ func (e *Execution) Clean(t testingT) {
41 41
 	}
42 42
 }
43 43
 
44
-func unpauseAllContainers(t testingT, client client.ContainerAPIClient) {
44
+func unpauseAllContainers(t assert.TestingT, client client.ContainerAPIClient) {
45 45
 	ctx := context.Background()
46 46
 	containers := getPausedContainers(ctx, t, client)
47 47
 	if len(containers) > 0 {
... ...
@@ -52,7 +52,7 @@ func unpauseAllContainers(t testingT, client client.ContainerAPIClient) {
52 52
 	}
53 53
 }
54 54
 
55
-func getPausedContainers(ctx context.Context, t testingT, client client.ContainerAPIClient) []types.Container {
55
+func getPausedContainers(ctx context.Context, t assert.TestingT, client client.ContainerAPIClient) []types.Container {
56 56
 	filter := filters.NewArgs()
57 57
 	filter.Add("status", "paused")
58 58
 	containers, err := client.ContainerList(ctx, types.ContainerListOptions{
... ...
@@ -66,7 +66,7 @@ func getPausedContainers(ctx context.Context, t testingT, client client.Containe
66 66
 
67 67
 var alreadyExists = regexp.MustCompile(`Error response from daemon: removal of container (\w+) is already in progress`)
68 68
 
69
-func deleteAllContainers(t testingT, apiclient client.ContainerAPIClient) {
69
+func deleteAllContainers(t assert.TestingT, apiclient client.ContainerAPIClient) {
70 70
 	ctx := context.Background()
71 71
 	containers := getAllContainers(ctx, t, apiclient)
72 72
 	if len(containers) == 0 {
... ...
@@ -85,7 +85,7 @@ func deleteAllContainers(t testingT, apiclient client.ContainerAPIClient) {
85 85
 	}
86 86
 }
87 87
 
88
-func getAllContainers(ctx context.Context, t testingT, client client.ContainerAPIClient) []types.Container {
88
+func getAllContainers(ctx context.Context, t assert.TestingT, client client.ContainerAPIClient) []types.Container {
89 89
 	containers, err := client.ContainerList(ctx, types.ContainerListOptions{
90 90
 		Quiet: true,
91 91
 		All:   true,
... ...
@@ -116,7 +116,7 @@ func deleteAllImages(t testingT, apiclient client.ImageAPIClient, protectedImage
116 116
 	}
117 117
 }
118 118
 
119
-func removeImage(ctx context.Context, t testingT, apiclient client.ImageAPIClient, ref string) {
119
+func removeImage(ctx context.Context, t assert.TestingT, apiclient client.ImageAPIClient, ref string) {
120 120
 	_, err := apiclient.ImageRemove(ctx, ref, types.ImageRemoveOptions{
121 121
 		Force: true,
122 122
 	})
... ...
@@ -126,7 +126,7 @@ func removeImage(ctx context.Context, t testingT, apiclient client.ImageAPIClien
126 126
 	assert.NoError(t, err, "failed to remove image %s", ref)
127 127
 }
128 128
 
129
-func deleteAllVolumes(t testingT, c client.VolumeAPIClient) {
129
+func deleteAllVolumes(t assert.TestingT, c client.VolumeAPIClient) {
130 130
 	volumes, err := c.VolumeList(context.Background(), filters.Args{})
131 131
 	assert.NoError(t, err, "failed to list volumes")
132 132
 
... ...
@@ -136,7 +136,7 @@ func deleteAllVolumes(t testingT, c client.VolumeAPIClient) {
136 136
 	}
137 137
 }
138 138
 
139
-func deleteAllNetworks(t testingT, c client.NetworkAPIClient, daemonPlatform string) {
139
+func deleteAllNetworks(t assert.TestingT, c client.NetworkAPIClient, daemonPlatform string) {
140 140
 	networks, err := c.NetworkList(context.Background(), types.NetworkListOptions{})
141 141
 	assert.NoError(t, err, "failed to list networks")
142 142
 
... ...
@@ -153,7 +153,7 @@ func deleteAllNetworks(t testingT, c client.NetworkAPIClient, daemonPlatform str
153 153
 	}
154 154
 }
155 155
 
156
-func deleteAllPlugins(t testingT, c client.PluginAPIClient) {
156
+func deleteAllPlugins(t assert.TestingT, c client.PluginAPIClient) {
157 157
 	plugins, err := c.PluginList(context.Background(), filters.Args{})
158 158
 	assert.NoError(t, err, "failed to list plugins")
159 159
 
... ...
@@ -37,7 +37,7 @@ func ProtectImages(t testingT, testEnv *Execution) {
37 37
 	testEnv.ProtectImage(t, images...)
38 38
 }
39 39
 
40
-func getExistingImages(t testingT, testEnv *Execution) []string {
40
+func getExistingImages(t require.TestingT, testEnv *Execution) []string {
41 41
 	client := testEnv.APIClient()
42 42
 	filter := filters.NewArgs()
43 43
 	filter.Add("dangling", "false")