[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:
dmitri-netbird
2026-09-10 20:05:42 +02:00
committed by GitHub
parent 0fac1ee638
commit e704203927
+2 -2
View File
@@ -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)