Browse code

Use prefix naming for links tests

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>

Alexandr Morozov authored on 2014/09/20 02:46:43
Showing 1 changed files
... ...
@@ -11,7 +11,7 @@ import (
11 11
 	"github.com/docker/docker/pkg/iptables"
12 12
 )
13 13
 
14
-func TestEtcHostsRegularFile(t *testing.T) {
14
+func TestLinksEtcHostsRegularFile(t *testing.T) {
15 15
 	runCmd := exec.Command(dockerBinary, "run", "--net=host", "busybox", "ls", "-la", "/etc/hosts")
16 16
 	out, _, _, err := runCommandWithStdoutStderr(runCmd)
17 17
 	errorOut(err, t, out)
... ...
@@ -25,7 +25,7 @@ func TestEtcHostsRegularFile(t *testing.T) {
25 25
 	logDone("link - /etc/hosts is a regular file")
26 26
 }
27 27
 
28
-func TestEtcHostsContentMatch(t *testing.T) {
28
+func TestLinksEtcHostsContentMatch(t *testing.T) {
29 29
 	runCmd := exec.Command(dockerBinary, "run", "--net=host", "busybox", "cat", "/etc/hosts")
30 30
 	out, _, _, err := runCommandWithStdoutStderr(runCmd)
31 31
 	errorOut(err, t, out)
... ...
@@ -44,7 +44,7 @@ func TestEtcHostsContentMatch(t *testing.T) {
44 44
 	logDone("link - /etc/hosts matches hosts copy")
45 45
 }
46 46
 
47
-func TestPingUnlinkedContainers(t *testing.T) {
47
+func TestLinksPingUnlinkedContainers(t *testing.T) {
48 48
 	runCmd := exec.Command(dockerBinary, "run", "--rm", "busybox", "sh", "-c", "ping -c 1 alias1 -W 1 && ping -c 1 alias2 -W 1")
49 49
 	exitCode, err := runCommand(runCmd)
50 50
 
... ...
@@ -57,7 +57,7 @@ func TestPingUnlinkedContainers(t *testing.T) {
57 57
 	logDone("links - ping unlinked container")
58 58
 }
59 59
 
60
-func TestPingLinkedContainers(t *testing.T) {
60
+func TestLinksPingLinkedContainers(t *testing.T) {
61 61
 	var out string
62 62
 	out, _, _ = cmd(t, "run", "-d", "--name", "container1", "busybox", "sleep", "10")
63 63
 	idA := stripTrailingCharacters(out)
... ...
@@ -71,7 +71,7 @@ func TestPingLinkedContainers(t *testing.T) {
71 71
 	logDone("links - ping linked container")
72 72
 }
73 73
 
74
-func TestIpTablesRulesWhenLinkAndUnlink(t *testing.T) {
74
+func TestLinksIpTablesRulesWhenLinkAndUnlink(t *testing.T) {
75 75
 	cmd(t, "run", "-d", "--name", "child", "--publish", "8080:80", "busybox", "sleep", "10")
76 76
 	cmd(t, "run", "-d", "--name", "parent", "--link", "child:http", "busybox", "sleep", "10")
77 77
 
... ...
@@ -96,7 +96,7 @@ func TestIpTablesRulesWhenLinkAndUnlink(t *testing.T) {
96 96
 	logDone("link - verify iptables when link and unlink")
97 97
 }
98 98
 
99
-func TestInspectLinksStarted(t *testing.T) {
99
+func TestLinksInspectLinksStarted(t *testing.T) {
100 100
 	var (
101 101
 		expected = map[string]struct{}{"/container1:/testinspectlink/alias1": {}, "/container2:/testinspectlink/alias2": {}}
102 102
 		result   []string
... ...
@@ -125,7 +125,7 @@ func TestInspectLinksStarted(t *testing.T) {
125 125
 	logDone("link - links in started container inspect")
126 126
 }
127 127
 
128
-func TestInspectLinksStopped(t *testing.T) {
128
+func TestLinksInspectLinksStopped(t *testing.T) {
129 129
 	var (
130 130
 		expected = map[string]struct{}{"/container1:/testinspectlink/alias1": {}, "/container2:/testinspectlink/alias2": {}}
131 131
 		result   []string