shithub: libdp9ik

ref: 7e77582b6904979700dde6b0cba53f2d91e2b28d

View raw version
package libdp9ik_test

import (
	auth "git.sr.ht/~moody/libdp9ik"
	"net"
	"testing"
)

const (
	rcpuPort  = "17019"
	cpuServer = "192.168.1.6"
	authPort  = "567"
)

func TestP9any(t *testing.T) {
	fd, err := net.Dial("tcp", cpuServer+":"+rcpuPort)
	if err != nil {
		t.Fatal(err)
	}
	tfd, err := net.Dial("tcp", cpuServer+":"+authPort)
	if err != nil {
		t.Fatal(err)
	}
	_, err = auth.P9any(fd, tfd, "user", "password")
	if err != nil {
		t.Fatal(err)
	}
}