mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-06 16:18:00 +08:00
🐞 Metrics Integration: thread the port
Confession: I have no idea why I didn't use the global variable `port` instead of deciding to thread `port` as a parameter. But for some reason I felt that it was a good idea. Oh well. Committing these changes before they're lost.
This commit is contained in:
@@ -19,10 +19,9 @@ var err error
|
||||
var serverCmd *exec.Cmd
|
||||
var serverSession *Session
|
||||
var port = getFreePort()
|
||||
var serverPath, _ = Build("main.go")
|
||||
|
||||
var _ = BeforeSuite(func() {
|
||||
// Try to bind to the privileged first (for macOS), the fall back to unprivileged
|
||||
serverPath, err := Build("main.go")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
serverCmd = exec.Command(serverPath, "-port", strconv.Itoa(port))
|
||||
serverSession, err = Start(serverCmd, GinkgoWriter, GinkgoWriter)
|
||||
|
Reference in New Issue
Block a user