mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
[management] do not hard-code tmp dir path in ws_conn_adapter_test (#7503)
* do not hard-code tmp dir path Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> * use os.TempDir to get tmp dir Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io> --------- Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
@@ -34,7 +34,7 @@ func TestAdapterHandlingConnectionClosures(t *testing.T) {
|
||||
|
||||
for _, c := range cases {
|
||||
t.Run(c.description, func(t *testing.T) {
|
||||
serversock := filepath.Join("/tmp", "http-server-"+strconv.FormatInt(rand.Int64(), 10)+".sock")
|
||||
serversock := filepath.Join(os.TempDir(), "http-server-"+strconv.FormatInt(rand.Int64(), 10)+".sock")
|
||||
t.Cleanup(func() { os.Remove(serversock) })
|
||||
|
||||
l, err := net.Listen("unix", serversock)
|
||||
@@ -111,7 +111,7 @@ func TestAdapterHandlingConnectionClosures(t *testing.T) {
|
||||
func TestAdapterHandlingHttpConnection_NoHeadersSent(t *testing.T) {
|
||||
t.Skip("currently disabled as it requires idle timeout to be set")
|
||||
|
||||
serversock := filepath.Join("/tmp", "http-server-"+strconv.FormatInt(rand.Int64(), 10)+".sock")
|
||||
serversock := filepath.Join(os.TempDir(), "http-server-"+strconv.FormatInt(rand.Int64(), 10)+".sock")
|
||||
defer os.Remove(serversock)
|
||||
|
||||
l, err := net.Listen("unix", serversock)
|
||||
|
||||
Reference in New Issue
Block a user