Merge lp:~pedronis/ubuntu-push/some-imports-reorg into lp:ubuntu-push

Proposed by Samuele Pedroni
Status: Merged
Approved by: Samuele Pedroni
Approved revision: 62
Merged at revision: 59
Proposed branch: lp:~pedronis/ubuntu-push/some-imports-reorg
Merge into: lp:ubuntu-push
Diff against target: 683 lines (+105/-60)
37 files modified
config/config_test.go (+2/-1)
logger/logger_test.go (+2/-1)
protocol/messages_test.go (+2/-1)
protocol/protocol_test.go (+2/-1)
server/acceptance/acceptance_test.go (+6/-4)
server/acceptance/acceptanceclient.go (+2/-1)
server/acceptance/cmd/acceptanceclient.go (+3/-2)
server/api/handlers.go (+2/-1)
server/api/handlers_test.go (+4/-2)
server/api/middleware.go (+2/-1)
server/api/middleware_test.go (+4/-2)
server/bootlog.go (+2/-1)
server/bootlog_test.go (+4/-2)
server/broker/broker.go (+1/-0)
server/broker/broker_test.go (+1/-0)
server/broker/exchanges.go (+1/-1)
server/broker/exchanges_test.go (+4/-3)
server/broker/exchg_impl_test.go (+1/-1)
server/broker/simple/simple.go (+2/-2)
server/broker/simple/simple_test.go (+4/-3)
server/broker/simple/suite_test.go (+1/-0)
server/broker/testsuite/suite.go (+4/-2)
server/config_test.go (+4/-2)
server/dev/server.go (+4/-3)
server/listener/listener.go (+2/-1)
server/listener/listener_test.go (+4/-2)
server/runner_devices.go (+4/-3)
server/runner_http.go (+2/-1)
server/runner_test.go (+5/-3)
server/session/session.go (+3/-2)
server/session/session_test.go (+7/-5)
server/session/tracker.go (+3/-2)
server/session/tracker_test.go (+3/-1)
server/store/inmemory_test.go (+1/-0)
server/store/store_test.go (+3/-1)
testing/condition/condition_test.go (+2/-1)
testing/helpers.go (+2/-1)
To merge this branch: bzr merge lp:~pedronis/ubuntu-push/some-imports-reorg
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+205666@code.launchpad.net

Commit message

[trivial] reorg imports in: config logger protocol server testing as: stdlib -- 3rdparty -- own

Description of the change

reorg imports in:

stdlib

3rd party

own

in config logger protocol server testing

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config/config_test.go'
2--- config/config_test.go 2014-01-21 21:35:21 +0000
3+++ config/config_test.go 2014-02-10 23:28:55 +0000
4@@ -19,12 +19,13 @@
5 import (
6 "bytes"
7 "io/ioutil"
8- . "launchpad.net/gocheck"
9 "os"
10 "path/filepath"
11 "reflect"
12 "testing"
13 "time"
14+
15+ . "launchpad.net/gocheck"
16 )
17
18 func TestConfig(t *testing.T) { TestingT(t) }
19
20=== modified file 'logger/logger_test.go'
21--- logger/logger_test.go 2014-02-04 20:51:39 +0000
22+++ logger/logger_test.go 2014-02-10 23:28:55 +0000
23@@ -19,11 +19,12 @@
24 import (
25 "bytes"
26 "fmt"
27- . "launchpad.net/gocheck"
28 "log"
29 "os"
30 "runtime"
31 "testing"
32+
33+ . "launchpad.net/gocheck"
34 )
35
36 func TestLogger(t *testing.T) { TestingT(t) }
37
38=== modified file 'protocol/messages_test.go'
39--- protocol/messages_test.go 2014-01-14 15:35:20 +0000
40+++ protocol/messages_test.go 2014-02-10 23:28:55 +0000
41@@ -19,8 +19,9 @@
42 import (
43 "encoding/json"
44 "fmt"
45+ "strings"
46+
47 . "launchpad.net/gocheck"
48- "strings"
49 )
50
51 type messagesSuite struct{}
52
53=== modified file 'protocol/protocol_test.go'
54--- protocol/protocol_test.go 2014-01-14 15:35:20 +0000
55+++ protocol/protocol_test.go 2014-02-10 23:28:55 +0000
56@@ -21,10 +21,11 @@
57 "encoding/json"
58 // "fmt"
59 "io"
60- . "launchpad.net/gocheck"
61 "net"
62 "testing"
63 "time"
64+
65+ . "launchpad.net/gocheck"
66 )
67
68 func TestProtocol(t *testing.T) { TestingT(t) }
69
70=== modified file 'server/acceptance/acceptance_test.go'
71--- server/acceptance/acceptance_test.go 2014-02-04 12:26:33 +0000
72+++ server/acceptance/acceptance_test.go 2014-02-10 23:28:55 +0000
73@@ -23,10 +23,6 @@
74 "flag"
75 "fmt"
76 "io/ioutil"
77- . "launchpad.net/gocheck"
78- "launchpad.net/ubuntu-push/protocol"
79- "launchpad.net/ubuntu-push/server/api"
80- helpers "launchpad.net/ubuntu-push/testing"
81 "net"
82 "net/http"
83 "os"
84@@ -37,6 +33,12 @@
85 "strings"
86 "testing"
87 "time"
88+
89+ . "launchpad.net/gocheck"
90+
91+ "launchpad.net/ubuntu-push/protocol"
92+ "launchpad.net/ubuntu-push/server/api"
93+ helpers "launchpad.net/ubuntu-push/testing"
94 )
95
96 func TestAcceptance(t *testing.T) { TestingT(t) }
97
98=== modified file 'server/acceptance/acceptanceclient.go'
99--- server/acceptance/acceptanceclient.go 2014-01-15 15:54:20 +0000
100+++ server/acceptance/acceptanceclient.go 2014-02-10 23:28:55 +0000
101@@ -22,9 +22,10 @@
102 "encoding/json"
103 "errors"
104 "fmt"
105- "launchpad.net/ubuntu-push/protocol"
106 "net"
107 "time"
108+
109+ "launchpad.net/ubuntu-push/protocol"
110 )
111
112 var wireVersionBytes = []byte{protocol.ProtocolWireVersion}
113
114=== modified file 'server/acceptance/cmd/acceptanceclient.go'
115--- server/acceptance/cmd/acceptanceclient.go 2014-01-15 15:54:20 +0000
116+++ server/acceptance/cmd/acceptanceclient.go 2014-02-10 23:28:55 +0000
117@@ -19,11 +19,12 @@
118
119 import (
120 "flag"
121- "launchpad.net/ubuntu-push/config"
122- "launchpad.net/ubuntu-push/server/acceptance"
123 "log"
124 "os"
125 "path/filepath"
126+
127+ "launchpad.net/ubuntu-push/config"
128+ "launchpad.net/ubuntu-push/server/acceptance"
129 )
130
131 var (
132
133=== modified file 'server/api/handlers.go'
134--- server/api/handlers.go 2014-01-29 10:12:35 +0000
135+++ server/api/handlers.go 2014-02-10 23:28:55 +0000
136@@ -22,10 +22,11 @@
137 "encoding/json"
138 "fmt"
139 "io"
140+ "net/http"
141+
142 "launchpad.net/ubuntu-push/logger"
143 "launchpad.net/ubuntu-push/server/broker"
144 "launchpad.net/ubuntu-push/server/store"
145- "net/http"
146 )
147
148 const MaxRequestBodyBytes = 4 * 1024
149
150=== modified file 'server/api/handlers_test.go'
151--- server/api/handlers_test.go 2014-01-29 10:10:57 +0000
152+++ server/api/handlers_test.go 2014-02-10 23:28:55 +0000
153@@ -22,12 +22,14 @@
154 "errors"
155 "fmt"
156 "io/ioutil"
157- . "launchpad.net/gocheck"
158- "launchpad.net/ubuntu-push/server/store"
159 "net/http"
160 "net/http/httptest"
161 "strings"
162 "testing"
163+
164+ . "launchpad.net/gocheck"
165+
166+ "launchpad.net/ubuntu-push/server/store"
167 )
168
169 func TestHandlers(t *testing.T) { TestingT(t) }
170
171=== modified file 'server/api/middleware.go'
172--- server/api/middleware.go 2014-01-16 16:15:23 +0000
173+++ server/api/middleware.go 2014-02-10 23:28:55 +0000
174@@ -18,8 +18,9 @@
175
176 import (
177 "fmt"
178+ "net/http"
179+
180 "launchpad.net/ubuntu-push/logger"
181- "net/http"
182 )
183
184 // PanicTo500Handler wraps another handler such that panics are recovered
185
186=== modified file 'server/api/middleware_test.go'
187--- server/api/middleware_test.go 2014-02-04 22:30:56 +0000
188+++ server/api/middleware_test.go 2014-02-10 23:28:55 +0000
189@@ -17,10 +17,12 @@
190 package api
191
192 import (
193+ "net/http"
194+ "net/http/httptest"
195+
196 . "launchpad.net/gocheck"
197+
198 helpers "launchpad.net/ubuntu-push/testing"
199- "net/http"
200- "net/http/httptest"
201 )
202
203 type middlewareSuite struct{}
204
205=== modified file 'server/bootlog.go'
206--- server/bootlog.go 2014-01-23 15:33:30 +0000
207+++ server/bootlog.go 2014-02-10 23:28:55 +0000
208@@ -17,9 +17,10 @@
209 package server
210
211 import (
212- "launchpad.net/ubuntu-push/logger"
213 "net"
214 "os"
215+
216+ "launchpad.net/ubuntu-push/logger"
217 )
218
219 // boot logging and hooks
220
221=== modified file 'server/bootlog_test.go'
222--- server/bootlog_test.go 2014-02-04 22:26:04 +0000
223+++ server/bootlog_test.go 2014-02-10 23:28:55 +0000
224@@ -17,10 +17,12 @@
225 package server
226
227 import (
228+ "net"
229+ "testing"
230+
231 . "launchpad.net/gocheck"
232+
233 helpers "launchpad.net/ubuntu-push/testing"
234- "net"
235- "testing"
236 )
237
238 func TestRunners(t *testing.T) { TestingT(t) }
239
240=== modified file 'server/broker/broker.go'
241--- server/broker/broker.go 2014-01-31 16:36:16 +0000
242+++ server/broker/broker.go 2014-02-10 23:28:55 +0000
243@@ -20,6 +20,7 @@
244
245 import (
246 "fmt"
247+
248 "launchpad.net/ubuntu-push/protocol"
249 "launchpad.net/ubuntu-push/server/store"
250 )
251
252=== modified file 'server/broker/broker_test.go'
253--- server/broker/broker_test.go 2014-01-23 20:13:22 +0000
254+++ server/broker/broker_test.go 2014-02-10 23:28:55 +0000
255@@ -18,6 +18,7 @@
256
257 import (
258 "fmt"
259+
260 . "launchpad.net/gocheck"
261 )
262
263
264=== modified file 'server/broker/exchanges.go'
265--- server/broker/exchanges.go 2014-02-04 12:26:33 +0000
266+++ server/broker/exchanges.go 2014-02-10 23:28:55 +0000
267@@ -18,9 +18,9 @@
268
269 import (
270 "encoding/json"
271+
272 "launchpad.net/ubuntu-push/protocol"
273 "launchpad.net/ubuntu-push/server/store"
274- // "log"
275 )
276
277 // Exchanges
278
279=== modified file 'server/broker/exchanges_test.go'
280--- server/broker/exchanges_test.go 2014-01-31 16:36:16 +0000
281+++ server/broker/exchanges_test.go 2014-02-10 23:28:55 +0000
282@@ -18,15 +18,16 @@
283
284 import (
285 "encoding/json"
286+ stdtesting "testing"
287+
288 . "launchpad.net/gocheck"
289+
290 "launchpad.net/ubuntu-push/server/broker"
291 "launchpad.net/ubuntu-push/server/broker/testing"
292 "launchpad.net/ubuntu-push/server/store"
293- // "log"
294- gotesting "testing"
295 )
296
297-func TestBroker(t *gotesting.T) { TestingT(t) }
298+func TestBroker(t *stdtesting.T) { TestingT(t) }
299
300 type exchangesSuite struct{}
301
302
303=== modified file 'server/broker/exchg_impl_test.go'
304--- server/broker/exchg_impl_test.go 2014-02-04 12:26:33 +0000
305+++ server/broker/exchg_impl_test.go 2014-02-10 23:28:55 +0000
306@@ -18,8 +18,8 @@
307
308 import (
309 "encoding/json"
310+
311 . "launchpad.net/gocheck"
312- // "log"
313 )
314
315 type exchangesImplSuite struct{}
316
317=== modified file 'server/broker/simple/simple.go'
318--- server/broker/simple/simple.go 2014-01-23 20:13:22 +0000
319+++ server/broker/simple/simple.go 2014-02-10 23:28:55 +0000
320@@ -18,12 +18,12 @@
321 package simple
322
323 import (
324+ "sync"
325+
326 "launchpad.net/ubuntu-push/logger"
327 "launchpad.net/ubuntu-push/protocol"
328 "launchpad.net/ubuntu-push/server/broker"
329 "launchpad.net/ubuntu-push/server/store"
330- // "log"
331- "sync"
332 )
333
334 // SimpleBroker implements broker.Broker/BrokerSending for everything in just one process.
335
336=== modified file 'server/broker/simple/simple_test.go'
337--- server/broker/simple/simple_test.go 2014-01-23 20:13:22 +0000
338+++ server/broker/simple/simple_test.go 2014-02-10 23:28:55 +0000
339@@ -18,15 +18,16 @@
340
341 import (
342 "encoding/json"
343+ stdtesting "testing"
344+
345 . "launchpad.net/gocheck"
346+
347 "launchpad.net/ubuntu-push/server/broker"
348 "launchpad.net/ubuntu-push/server/broker/testing"
349 "launchpad.net/ubuntu-push/server/store"
350- // "log"
351- gotesting "testing"
352 )
353
354-func TestSimple(t *gotesting.T) { TestingT(t) }
355+func TestSimple(t *stdtesting.T) { TestingT(t) }
356
357 type simpleSuite struct{}
358
359
360=== modified file 'server/broker/simple/suite_test.go'
361--- server/broker/simple/suite_test.go 2014-02-04 21:35:11 +0000
362+++ server/broker/simple/suite_test.go 2014-02-10 23:28:55 +0000
363@@ -18,6 +18,7 @@
364
365 import (
366 . "launchpad.net/gocheck"
367+
368 "launchpad.net/ubuntu-push/logger"
369 "launchpad.net/ubuntu-push/server/broker"
370 "launchpad.net/ubuntu-push/server/broker/testsuite"
371
372=== modified file 'server/broker/testsuite/suite.go'
373--- server/broker/testsuite/suite.go 2014-02-04 22:30:42 +0000
374+++ server/broker/testsuite/suite.go 2014-02-10 23:28:55 +0000
375@@ -20,15 +20,17 @@
376 import (
377 "encoding/json"
378 "errors"
379+ // "log"
380+ "time"
381+
382 . "launchpad.net/gocheck"
383+
384 "launchpad.net/ubuntu-push/logger"
385 "launchpad.net/ubuntu-push/protocol"
386 "launchpad.net/ubuntu-push/server/broker"
387 "launchpad.net/ubuntu-push/server/broker/testing"
388 "launchpad.net/ubuntu-push/server/store"
389 helpers "launchpad.net/ubuntu-push/testing"
390- // "log"
391- "time"
392 )
393
394 // The expected interface for tested brokers.
395
396=== modified file 'server/config_test.go'
397--- server/config_test.go 2014-01-23 15:33:30 +0000
398+++ server/config_test.go 2014-02-10 23:28:55 +0000
399@@ -19,11 +19,13 @@
400 import (
401 "bytes"
402 "io/ioutil"
403- . "launchpad.net/gocheck"
404- "launchpad.net/ubuntu-push/config"
405 "os"
406 "path/filepath"
407 "time"
408+
409+ . "launchpad.net/gocheck"
410+
411+ "launchpad.net/ubuntu-push/config"
412 )
413
414 type configSuite struct{}
415
416=== modified file 'server/dev/server.go'
417--- server/dev/server.go 2014-01-23 18:39:10 +0000
418+++ server/dev/server.go 2014-02-10 23:28:55 +0000
419@@ -18,6 +18,10 @@
420 package main
421
422 import (
423+ "net"
424+ "os"
425+ "path/filepath"
426+
427 "launchpad.net/ubuntu-push/config"
428 "launchpad.net/ubuntu-push/logger"
429 "launchpad.net/ubuntu-push/server"
430@@ -25,9 +29,6 @@
431 "launchpad.net/ubuntu-push/server/broker/simple"
432 "launchpad.net/ubuntu-push/server/session"
433 "launchpad.net/ubuntu-push/server/store"
434- "net"
435- "os"
436- "path/filepath"
437 )
438
439 type configuration struct {
440
441=== modified file 'server/listener/listener.go'
442--- server/listener/listener.go 2014-01-21 21:34:10 +0000
443+++ server/listener/listener.go 2014-02-10 23:28:55 +0000
444@@ -19,9 +19,10 @@
445
446 import (
447 "crypto/tls"
448- "launchpad.net/ubuntu-push/logger"
449 "net"
450 "time"
451+
452+ "launchpad.net/ubuntu-push/logger"
453 )
454
455 // A DeviceListenerConfig offers the DeviceListener configuration.
456
457=== modified file 'server/listener/listener_test.go'
458--- server/listener/listener_test.go 2014-02-04 21:35:11 +0000
459+++ server/listener/listener_test.go 2014-02-10 23:28:55 +0000
460@@ -19,12 +19,14 @@
461 import (
462 "crypto/tls"
463 "crypto/x509"
464- . "launchpad.net/gocheck"
465- helpers "launchpad.net/ubuntu-push/testing"
466 "net"
467 "syscall"
468 "testing"
469 "time"
470+
471+ . "launchpad.net/gocheck"
472+
473+ helpers "launchpad.net/ubuntu-push/testing"
474 )
475
476 func TestListener(t *testing.T) { TestingT(t) }
477
478=== modified file 'server/runner_devices.go'
479--- server/runner_devices.go 2014-01-23 15:33:30 +0000
480+++ server/runner_devices.go 2014-02-10 23:28:55 +0000
481@@ -18,12 +18,13 @@
482
483 import (
484 "fmt"
485+ "net"
486+ "syscall"
487+ "time"
488+
489 "launchpad.net/ubuntu-push/config"
490 "launchpad.net/ubuntu-push/logger"
491 "launchpad.net/ubuntu-push/server/listener"
492- "net"
493- "syscall"
494- "time"
495 )
496
497 // A DevicesParsedConfig holds and can be used to parse the device server config.
498
499=== modified file 'server/runner_http.go'
500--- server/runner_http.go 2014-01-23 15:33:30 +0000
501+++ server/runner_http.go 2014-02-10 23:28:55 +0000
502@@ -17,9 +17,10 @@
503 package server
504
505 import (
506- "launchpad.net/ubuntu-push/config"
507 "net"
508 "net/http"
509+
510+ "launchpad.net/ubuntu-push/config"
511 )
512
513 // A HTTPServeParsedConfig holds and can be used to parse the HTTP server config.
514
515=== modified file 'server/runner_test.go'
516--- server/runner_test.go 2014-02-04 22:51:42 +0000
517+++ server/runner_test.go 2014-02-10 23:28:55 +0000
518@@ -19,12 +19,14 @@
519 import (
520 "fmt"
521 "io/ioutil"
522+ "net"
523+ "net/http"
524+ "time"
525+
526 . "launchpad.net/gocheck"
527+
528 "launchpad.net/ubuntu-push/config"
529 helpers "launchpad.net/ubuntu-push/testing"
530- "net"
531- "net/http"
532- "time"
533 )
534
535 type runnerSuite struct {
536
537=== modified file 'server/session/session.go'
538--- server/session/session.go 2014-01-31 17:25:02 +0000
539+++ server/session/session.go 2014-02-10 23:28:55 +0000
540@@ -18,10 +18,11 @@
541 package session
542
543 import (
544+ "net"
545+ "time"
546+
547 "launchpad.net/ubuntu-push/protocol"
548 "launchpad.net/ubuntu-push/server/broker"
549- "net"
550- "time"
551 )
552
553 // SessionConfig is for carrying the session configuration.
554
555=== modified file 'server/session/session_test.go'
556--- server/session/session_test.go 2014-02-04 22:39:18 +0000
557+++ server/session/session_test.go 2014-02-10 23:28:55 +0000
558@@ -22,18 +22,20 @@
559 "errors"
560 "fmt"
561 "io"
562+ "net"
563+ "reflect"
564+ stdtesting "testing"
565+ "time"
566+
567 . "launchpad.net/gocheck"
568+
569 "launchpad.net/ubuntu-push/protocol"
570 "launchpad.net/ubuntu-push/server/broker"
571 "launchpad.net/ubuntu-push/server/broker/testing"
572 helpers "launchpad.net/ubuntu-push/testing"
573- "net"
574- "reflect"
575- gotesting "testing"
576- "time"
577 )
578
579-func TestSession(t *gotesting.T) { TestingT(t) }
580+func TestSession(t *stdtesting.T) { TestingT(t) }
581
582 type sessionSuite struct {
583 testlog *helpers.TestLogger
584
585=== modified file 'server/session/tracker.go'
586--- server/session/tracker.go 2014-01-31 17:25:02 +0000
587+++ server/session/tracker.go 2014-02-10 23:28:55 +0000
588@@ -17,10 +17,11 @@
589 package session
590
591 import (
592+ "net"
593+ "time"
594+
595 "launchpad.net/ubuntu-push/logger"
596 "launchpad.net/ubuntu-push/server/broker"
597- "net"
598- "time"
599 )
600
601 // SessionTracker logs session events.
602
603=== modified file 'server/session/tracker_test.go'
604--- server/session/tracker_test.go 2014-02-04 22:45:15 +0000
605+++ server/session/tracker_test.go 2014-02-10 23:28:55 +0000
606@@ -18,11 +18,13 @@
607
608 import (
609 "fmt"
610+ "net"
611+
612 . "launchpad.net/gocheck"
613+
614 "launchpad.net/ubuntu-push/server/broker"
615 "launchpad.net/ubuntu-push/server/broker/testing"
616 helpers "launchpad.net/ubuntu-push/testing"
617- "net"
618 )
619
620 type trackerSuite struct {
621
622=== modified file 'server/store/inmemory_test.go'
623--- server/store/inmemory_test.go 2014-01-14 15:35:20 +0000
624+++ server/store/inmemory_test.go 2014-02-10 23:28:55 +0000
625@@ -19,6 +19,7 @@
626 import (
627 "encoding/json"
628 // "fmt"
629+
630 . "launchpad.net/gocheck"
631 )
632
633
634=== modified file 'server/store/store_test.go'
635--- server/store/store_test.go 2014-01-14 15:35:20 +0000
636+++ server/store/store_test.go 2014-02-10 23:28:55 +0000
637@@ -18,9 +18,11 @@
638
639 import (
640 // "fmt"
641+ "testing"
642+
643 . "launchpad.net/gocheck"
644+
645 "launchpad.net/ubuntu-push/protocol"
646- "testing"
647 )
648
649 func TestStore(t *testing.T) { TestingT(t) }
650
651=== modified file 'testing/condition/condition_test.go'
652--- testing/condition/condition_test.go 2014-01-20 06:23:17 +0000
653+++ testing/condition/condition_test.go 2014-02-10 23:28:55 +0000
654@@ -17,8 +17,9 @@
655 package condition
656
657 import (
658+ "testing"
659+
660 "launchpad.net/gocheck" // not into . because we have our own Not
661- "testing"
662 )
663
664 // hook up gocheck
665
666=== modified file 'testing/helpers.go'
667--- testing/helpers.go 2014-02-07 10:48:21 +0000
668+++ testing/helpers.go 2014-02-10 23:28:55 +0000
669@@ -19,12 +19,13 @@
670
671 import (
672 "fmt"
673- "launchpad.net/ubuntu-push/logger"
674 "os"
675 "path/filepath"
676 "runtime"
677 "strings"
678 "sync"
679+
680+ "launchpad.net/ubuntu-push/logger"
681 )
682
683 type captureHelper struct {

Subscribers

People subscribed via source and target branches