Skip to content

Commit

Permalink
fix test in actions?
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecoffman committed Nov 16, 2023
1 parent d186af1 commit f26bb91
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/server/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ import (
"github.com/dependabot/cli/internal/model"
"net"
"net/http"
"os"
"testing"
)

func TestInput(t *testing.T) {
inputCh := make(chan *model.Input)
defer close(inputCh)

l, err := net.Listen("tcp", "127.0.0.1:0")
ip := ""
// prevents security popup
if os.Getenv("GOOS") == "darwin" {
ip = "127.0.0.1"
}
l, err := net.Listen("tcp", ip+":0")
if err != nil {
t.Fatal("Failed to create listener: ", err.Error())
}
Expand Down

0 comments on commit f26bb91

Please sign in to comment.