~ubuntu-branches/ubuntu/wily/ubuntu-push/wily-proposed

« back to all changes in this revision

Viewing changes to server/listener/listener_test.go

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Roberto Alsina, Bret Barker, Guillermo Gonzalez, Samuele Pedroni, John R. Lenton
  • Date: 2014-12-11 16:56:31 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20141211165631-mpkbn22icihn9u01
Tags: 0.66+15.04.20141211-0ubuntu1
[ Roberto Alsina ]
* Change the example app to use declared states.
* Add section describing limitations of the server API.

[ Bret Barker ]
* Fixes to PACKAGE_DEPS for client tests.

[ Guillermo Gonzalez ]
* Add 2 new errors for the server: ErrMissingUserId and
  ErrWrongRequestMethodGET.
* When The server reply 401 on /register, make the DBus call to Register
  return ErrBadAuth instead of ErrBadRequest.
* Add support to media-type in the Content-Type check at server/api
  handlers.

[ Samuele Pedroni ]
* Server-side logging improvements.
* Make tests more robust in the face of 1.3.

[ John R. Lenton ]
* Client-side logging improvements (including: loglevel defaults to info).
* Updated precommit script.
* Include code examples in docs (instead of repeating).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import (
20
20
        "crypto/tls"
 
21
        "io"
21
22
        "net"
22
23
        "os/exec"
23
24
        "regexp"
112
113
        conn.SetDeadline(time.Now().Add(10 * time.Second))
113
114
        var buf [1]byte
114
115
        for {
115
 
                _, err := conn.Read(buf[:])
 
116
                _, err := io.ReadFull(conn, buf[:])
116
117
                if err != nil {
117
118
                        return err
118
119
                }
137
138
 
138
139
func testReadByte(c *C, conn net.Conn, expected uint32) {
139
140
        var buf [1]byte
140
 
        _, err := conn.Read(buf[:])
 
141
        _, err := io.ReadFull(conn, buf[:])
141
142
        c.Check(err, IsNil)
142
143
        c.Check(buf[0], Equals, byte(expected))
143
144
}