Merge lp:~pedronis/ubuntu-push/acceptance-start-client-check-flexibility into lp:ubuntu-push/automatic

Proposed by Samuele Pedroni
Status: Merged
Approved by: Samuele Pedroni
Approved revision: 358
Merged at revision: 354
Proposed branch: lp:~pedronis/ubuntu-push/acceptance-start-client-check-flexibility
Merge into: lp:ubuntu-push/automatic
Diff against target: 48 lines (+11/-2)
2 files modified
server/acceptance/acceptanceclient.go (+2/-0)
server/acceptance/suites/suite.go (+9/-2)
To merge this branch: bzr merge lp:~pedronis/ubuntu-push/acceptance-start-client-check-flexibility
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
Review via email: mp+244097@code.launchpad.net

Commit message

introduce StartClientAuthFlex for acceptance tests: Start a client with auth, take a devId regexp, don't check any client event; support connbroken in acceptanceclient

Description of the change

introduce StartClientAuthFlex for acceptance tests: Start a client with auth, take a devId regexp, don't check any client event.

support connbroken in acceptanceclient

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

looks good.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (16.5 KiB)

The attempt to merge lp:~pedronis/ubuntu-push/acceptance-start-client-check-flexibility into lp:ubuntu-push/automatic failed. Below is the output from the failed tests.

scripts/deps.sh ubuntu-push-client.go
scripts/deps.sh server/dev/server.go
scripts/deps.sh server/acceptance/cmd/acceptanceclient.go
/mnt/tarmac/cache/ubuntu-push-automatic/go-ws/bin/godeps -t launchpad.net/ubuntu-push launchpad.net/ubuntu-push/accounts launchpad.net/ubuntu-push/bus launchpad.net/ubuntu-push/bus/connectivity launchpad.net/ubuntu-push/bus/emblemcounter launchpad.net/ubuntu-push/bus/haptic launchpad.net/ubuntu-push/bus/networkmanager launchpad.net/ubuntu-push/bus/notifications launchpad.net/ubuntu-push/bus/polld launchpad.net/ubuntu-push/bus/powerd launchpad.net/ubuntu-push/bus/systemimage launchpad.net/ubuntu-push/bus/testing launchpad.net/ubuntu-push/bus/unitygreeter launchpad.net/ubuntu-push/bus/windowstack launchpad.net/ubuntu-push/click launchpad.net/ubuntu-push/click/cappinfo launchpad.net/ubuntu-push/click/cblacklist launchpad.net/ubuntu-push/click/cclick launchpad.net/ubuntu-push/click/testing launchpad.net/ubuntu-push/client launchpad.net/ubuntu-push/client/gethosts launchpad.net/ubuntu-push/client/service launchpad.net/ubuntu-push/client/session launchpad.net/ubuntu-push/client/session/seenstate launchpad.net/ubuntu-push/config launchpad.net/ubuntu-push/external/murmur3 launchpad.net/ubuntu-push/identifier launchpad.net/ubuntu-push/identifier/testing launchpad.net/ubuntu-push/launch_helper launchpad.net/ubuntu-push/launch_helper/cual launchpad.net/ubuntu-push/launch_helper/helper_finder launchpad.net/ubuntu-push/launch_helper/legacy launchpad.net/ubuntu-push/logger launchpad.net/ubuntu-push/messaging launchpad.net/ubuntu-push/messaging/cmessaging launchpad.net/ubuntu-push/messaging/reply launchpad.net/ubuntu-push/nih launchpad.net/ubuntu-push/nih/cnih launchpad.net/ubuntu-push/poller launchpad.net/ubuntu-push/protocol launchpad.net/ubuntu-push/server launchpad.net/ubuntu-push/server/api launchpad.net/ubuntu-push/server/broker launchpad.net/ubuntu-push/server/broker/simple launchpad.net/ubuntu-push/server/broker/testing launchpad.net/ubuntu-push/server/broker/testsuite launchpad.net/ubuntu-push/server/dev launchpad.net/ubuntu-push/server/listener launchpad.net/ubuntu-push/server/session launchpad.net/ubuntu-push/server/store launchpad.net/ubuntu-push/sounds launchpad.net/ubuntu-push/testing launchpad.net/ubuntu-push/testing/condition launchpad.net/ubuntu-push/urldispatcher launchpad.net/ubuntu-push/urldispatcher/curldispatcher launchpad.net/ubuntu-push/util launchpad.net/ubuntu-push/server/acceptance/cmd/ launchpad.net/ubuntu-push/server/dev/ launchpad.net/ubuntu-push/ 2>/dev/null | cat > dependencies.tsv
rm -f -r /mnt/tarmac/cache/ubuntu-push-automatic/go-ws/pkg
mkdir -p /mnt/tarmac/cache/ubuntu-push-automatic/go-ws/bin
mkdir -p /mnt/tarmac/cache/ubuntu-push-automatic/go-ws/pkg
go get -u launchpad.net/godeps
go get -d -u launchpad.net/gocheck launchpad.net/go-dbus/v1 launchpad.net/go-xdg/v0 code.google.com/p/gosqlite/sqlite3 code.google.com/p/go-uuid/uuid
/mnt/tarmac/cache/ubuntu-push-automatic/go-ws/bin/godeps -u dependencies.tsv
code.google.com/p/go...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'server/acceptance/acceptanceclient.go'
2--- server/acceptance/acceptanceclient.go 2014-08-27 21:19:51 +0000
3+++ server/acceptance/acceptanceclient.go 2014-12-09 09:23:54 +0000
4@@ -176,6 +176,8 @@
5 events <- fmt.Sprintf("%sbroadcast chan:%v app:%v topLevel:%d payloads:%s", sess.Prefix, recv.ChanId, recv.AppId, recv.TopLevel, pack)
6 case "warn", "connwarn":
7 events <- fmt.Sprintf("%sconnwarn %s", sess.Prefix, recv.Reason)
8+ case "connbroken":
9+ events <- fmt.Sprintf("%sconnbroken %s", sess.Prefix, recv.Reason)
10 case "setparams":
11 sess.SetCookie(recv.SetCookie)
12 if sess.ReportSetParams {
13
14=== modified file 'server/acceptance/suites/suite.go'
15--- server/acceptance/suites/suite.go 2014-09-01 14:48:03 +0000
16+++ server/acceptance/suites/suite.go 2014-12-09 09:23:54 +0000
17@@ -22,6 +22,7 @@
18 "fmt"
19 "net"
20 "os"
21+ "regexp"
22 "runtime"
23 "time"
24
25@@ -48,6 +49,13 @@
26
27 // Start a client with auth.
28 func (h *ServerHandle) StartClientAuth(c *C, devId string, levels map[string]int64, auth string, cookie string) (events <-chan string, errorCh <-chan error, stop func()) {
29+ cliEvents, errCh, stop := h.StartClientAuthFlex(c, devId, levels, auth, cookie, regexp.QuoteMeta(devId))
30+ c.Assert(NextEvent(cliEvents, errCh), Matches, "connected .*")
31+ return cliEvents, errCh, stop
32+}
33+
34+// Start a client with auth, take a devId regexp, don't check any client event.
35+func (h *ServerHandle) StartClientAuthFlex(c *C, devId string, levels map[string]int64, auth, cookie, devIdRegexp string) (events <-chan string, errorCh <-chan error, stop func()) {
36 errCh := make(chan error, 1)
37 cliEvents := make(chan string, 10)
38 sess := testClientSession(h.ServerAddr, devId, "m1", "img1", false)
39@@ -76,9 +84,8 @@
40 go func() {
41 errCh <- sess.Run(cliEvents)
42 }()
43- c.Assert(NextEvent(cliEvents, errCh), Matches, "connected .*")
44 c.Assert(NextEvent(h.ServerEvents, nil), Matches, ".*session.* connected .*")
45- c.Assert(NextEvent(h.ServerEvents, nil), Matches, ".*session.* registered "+devId)
46+ c.Assert(NextEvent(h.ServerEvents, nil), Matches, ".*session.* registered "+devIdRegexp)
47 return cliEvents, errCh, func() { clientShutdown <- true }
48 }
49

Subscribers

People subscribed via source and target branches