Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F136122
endpoint_test.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
921 B
Subscribers
None
endpoint_test.go
View Options
package
endpoint
import
(
"testing"
"fmt"
"sshtunnel"
)
//function
func
TestEndPointString
(
t
*
testing
.
T
)
{
var
testend
sshtunnel
.
Endpoint
testend
.
Host
=
"localhost"
testend
.
Port
=
5555
// make a string and test what the string should be
stringWant
:=
"localhost:5555"
returnedString
:=
testend
.
String
()
fmt
.
Printf
(
"stringWant: %s\n"
,
stringWant
)
fmt
.
Printf
(
"returnedString : %s\n"
,
returnedString
)
// return string == stringwant // success
}
//function
func
TestEndPointParseString
(
t
*
testing
.
T
)
{
var
testRemote
sshtunnel
.
Endpoint
var
testLocal
sshtunnel
.
Endpoint
// make a string and test what the string should be
testLocal
,
testRemote
=
sshtunnel
.
ParseEndpointString
(
"5555:motherbrain.unr.edu:5555"
)
fmt
.
Printf
(
"Local: %s %s\n"
,
testLocal
.
Host
,
testLocal
.
Port
)
fmt
.
Printf
(
"Remote: %s %s \n"
,
testRemote
.
Host
,
testRemote
.
Port
)
// return string == stringwant // success
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 24, 7:50 PM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15164
Default Alt Text
endpoint_test.go (921 B)
Attached To
rST sshtunnel
Event Timeline
Log In to Comment