Explorar o código

Updated input test to use socket_to_fd.

This handles the differences between linux and windows.
Steve Thielemann %!s(int64=3) %!d(string=hai) anos
pai
achega
ff6801fc61
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  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}