github.com/projecteru2/core@v0.0.0-20240321043226-06bcc1c23f58/utils/service_test.go (about)

     1  package utils
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestGetOutboundAddress(t *testing.T) {
    10  	bind := "1.1.1.1:1234"
    11  	addr, err := GetOutboundAddress(bind, "8.8.8.8:80")
    12  	assert.NoError(t, err)
    13  	assert.Contains(t, addr, "1234")
    14  }