~ps-jenkins/ubuntu-push/ubuntu-vivid-proposed

« back to all changes in this revision

Viewing changes to server/broker/simple/suite_test.go

  • Committer: Roberto Alsina
  • Date: 2014-10-24 14:05:51 UTC
  • mfrom: (91.179.41 automatic)
  • mto: This revision was merged to the branch mainline in revision 136.
  • Revision ID: roberto.alsina@canonical.com-20141024140551-tsdz3xggo2rbwlqj
MergeĀ fromĀ automatic

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
        testsuite.CommonBrokerSuite
33
33
}
34
34
 
 
35
// trivial session tracker
 
36
type testTracker string
 
37
 
 
38
func (t testTracker) SessionId() string {
 
39
        return string(t)
 
40
}
 
41
 
35
42
var _ = Suite(&commonBrokerSuite{testsuite.CommonBrokerSuite{
36
43
        MakeBroker: func(sto store.PendingStore, cfg broker.BrokerConfig, log logger.Logger) testsuite.FullBroker {
37
44
                return NewSimpleBroker(sto, cfg, log)
38
45
        },
 
46
        MakeTracker: func(sessionId string) broker.SessionTracker {
 
47
                return testTracker(sessionId)
 
48
        },
39
49
        RevealSession: func(b broker.Broker, deviceId string) broker.BrokerSession {
40
50
                return b.(*SimpleBroker).registry[deviceId]
41
51
        },