~chipaca/snappy/atomic-follow-symlinks

« back to all changes in this revision

Viewing changes to _integration-tests/testutils/wait/wait.go

  • Committer: Snappy Tarmac
  • Author(s): Leo Arias
  • Date: 2015-10-15 15:43:21 UTC
  • mfrom: (745.5.4 examples6)
  • Revision ID: snappy_tarmac-20151015154321-dccnr6t5jgxxjm2g
Added a test for go-webserver-example snap. by elopio approved by fgimenez

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
}
47
47
 
48
48
// ForServerOnPort uses ForCommand to check for process listening on the given port
49
 
func ForServerOnPort(c *check.C, port int) (err error) {
50
 
        return ForCommand(c, fmt.Sprintf(`(?msU)^.*tcp.*0\.0\.0\.0:%d .*`, port), "netstat", "-tapn")
 
49
func ForServerOnPort(c *check.C, protocol string, port int) (err error) {
 
50
        return ForCommand(c, fmt.Sprintf(`(?msU)^.*%s .*:%d .* LISTEN.*`, protocol, port),
 
51
                "netstat", "-tapn")
51
52
}
52
53
 
53
54
// forCommand uses ForFunction to check for the execCommand output