Browse Source

Updated input test to use socket_to_fd.

This handles the differences between linux and windows.
Steve Thielemann 3 years ago
parent
commit
ff6801fc61
1 changed files with 1 additions and 5 deletions
  1. 1 5
      door/input_test.go

+ 1 - 5
door/input_test.go

@@ -4,7 +4,6 @@ import (
 	"flag"
 	"fmt"
 	"io/ioutil"
-	"net"
 	"os"
 	"testing"
 	"time"
@@ -29,10 +28,7 @@ func TestDoorInputConnection(t *testing.T) {
 	server.Write(buffer)
 
 	// Access Fd (File descriptor) of client for dropfile
-	client_conn := client.(*net.TCPConn)
-	client_file, err := client_conn.File()
-
-	var fd int = int(client_file.Fd())
+	var fd int = socket_to_fd(client)
 
 	// Create door32.sys file
 	dfc := DropfileConfig{2, fd, 1800, "Test BBSID", 1701, "Real Username", "Handle", 880, 28, 0, 12}