~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/network/hostport_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
219
219
                err:   `cannot parse " " as address:port: missing port in address  `,
220
220
        }, {
221
221
                input: ":",
222
 
                err:   `cannot parse ":" port: strconv.ParseInt: parsing "": invalid syntax`,
 
222
                err:   `cannot parse ":" port: strconv.(ParseInt|Atoi): parsing "": invalid syntax`,
223
223
        }, {
224
224
                input: "host",
225
225
                err:   `cannot parse "host" as address:port: missing port in address host`,
226
226
        }, {
227
227
                input: "host:port",
228
 
                err:   `cannot parse "host:port" port: strconv.ParseInt: parsing "port": invalid syntax`,
 
228
                err:   `cannot parse "host:port" port: strconv.(ParseInt|Atoi): parsing "port": invalid syntax`,
229
229
        }, {
230
230
                input: "::1",
231
231
                err:   `cannot parse "::1" as address:port: too many colons in address ::1`,
234
234
                err:   `cannot parse "1.2.3.4" as address:port: missing port in address 1.2.3.4`,
235
235
        }, {
236
236
                input: "1.2.3.4:foo",
237
 
                err:   `cannot parse "1.2.3.4:foo" port: strconv.ParseInt: parsing "foo": invalid syntax`,
 
237
                err:   `cannot parse "1.2.3.4:foo" port: strconv.(ParseInt|Atoi): parsing "foo": invalid syntax`,
238
238
        }} {
239
239
                c.Logf("test %d: input %q", i, test.input)
240
240
                // First test all error cases with a single argument.