~ubuntu-branches/ubuntu/saucy/juju-core/saucy-proposed

« back to all changes in this revision

Viewing changes to src/code.google.com/p/go.net/ipv4/multicastlistener_test.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-07-11 17:18:27 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130711171827-vjqkg40r0dlf7ys2
Tags: 1.11.2-0ubuntu1
* New upstream release.
* Make juju-core the default juju (LP: #1190634):
  - d/control: Add virtual package juju -> juju-core.
  - d/juju-core.postinst.in: Bump priority of alternatives over that of
    python juju packages.
* Enable for all architectures (LP: #1172505):
  - d/control: Version BD on golang-go to >= 2:1.1.1 to ensure CGO
    support for non-x86 archs, make juju-core Arch: any.
  - d/README.source: Dropped - no longer required.
* d/watch: Updated for new upstream tarball naming.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
func TestUDPSingleConnWithMultipleGroupListeners(t *testing.T) {
25
25
        if testing.Short() || !*testExternal {
26
 
                t.Logf("skipping test to avoid external network")
27
 
                return
 
26
                t.Skip("to avoid external network")
28
27
        }
29
28
 
30
29
        for _, tt := range udpMultipleGroupListenerTests {
43
42
                        t.Fatalf("net.Interfaces failed: %v", err)
44
43
                }
45
44
                for i, ifi := range ift {
46
 
                        if _, ok := isGoodForMulticast(&ifi); !ok {
 
45
                        if _, ok := isMulticastAvailable(&ifi); !ok {
47
46
                                continue
48
47
                        }
49
48
                        if err := p.JoinGroup(&ifi, tt.gaddr); err != nil {
61
60
 
62
61
func TestUDPMultipleConnWithMultipleGroupListeners(t *testing.T) {
63
62
        if testing.Short() || !*testExternal {
64
 
                t.Logf("skipping test to avoid external network")
65
 
                return
 
63
                t.Skip("to avoid external network")
66
64
        }
67
65
 
68
66
        for _, tt := range udpMultipleGroupListenerTests {
90
88
                        t.Fatalf("net.Interfaces failed: %v", err)
91
89
                }
92
90
                for i, ifi := range ift {
93
 
                        if _, ok := isGoodForMulticast(&ifi); !ok {
 
91
                        if _, ok := isMulticastAvailable(&ifi); !ok {
94
92
                                continue
95
93
                        }
96
94
                        for _, p := range ps {
112
110
 
113
111
func TestIPSingleConnWithSingleGroupListener(t *testing.T) {
114
112
        if testing.Short() || !*testExternal {
115
 
                t.Logf("skipping test to avoid external network")
116
 
                return
 
113
                t.Skip("to avoid external network")
117
114
        }
118
115
        if os.Getuid() != 0 {
119
 
                t.Logf("skipping test; must be root")
120
 
                return
 
116
                t.Skip("must be root")
121
117
        }
122
118
 
123
119
        // listen to a wildcard address
139
135
                t.Fatalf("net.Interfaces failed: %v", err)
140
136
        }
141
137
        for i, ifi := range ift {
142
 
                if _, ok := isGoodForMulticast(&ifi); !ok {
 
138
                if _, ok := isMulticastAvailable(&ifi); !ok {
143
139
                        continue
144
140
                }
145
141
                if err := r.JoinGroup(&ifi, gaddr); err != nil {
156
152
 
157
153
func TestUDPPerInterfaceSingleConnWithSingleGroupListener(t *testing.T) {
158
154
        if testing.Short() || !*testExternal {
159
 
                t.Logf("skipping test to avoid external network")
160
 
                return
 
155
                t.Skip("to avoid external network")
161
156
        }
162
157
 
163
158
        gaddr := &net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
172
167
                t.Fatalf("net.Interfaces failed: %v", err)
173
168
        }
174
169
        for i, ifi := range ift {
175
 
                ip, ok := isGoodForMulticast(&ifi)
 
170
                ip, ok := isMulticastAvailable(&ifi)
176
171
                if !ok {
177
172
                        continue
178
173
                }
197
192
 
198
193
func TestIPPerInterfaceSingleConnWithSingleGroupListener(t *testing.T) {
199
194
        if testing.Short() || !*testExternal {
200
 
                t.Logf("skipping test to avoid external network")
201
 
                return
 
195
                t.Skip("to avoid external network")
202
196
        }
203
197
        if os.Getuid() != 0 {
204
 
                t.Logf("skipping test; must be root")
205
 
                return
 
198
                t.Skip("must be root")
206
199
        }
207
200
 
208
201
        gaddr := &net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727
217
210
                t.Fatalf("net.Interfaces failed: %v", err)
218
211
        }
219
212
        for i, ifi := range ift {
220
 
                ip, ok := isGoodForMulticast(&ifi)
 
213
                ip, ok := isMulticastAvailable(&ifi)
221
214
                if !ok {
222
215
                        continue
223
216
                }