/usr/share/gocode/src/github.com/masterzen/winrm/endpoint_test.go is in golang-github-masterzen-winrm-dev 0.0~git20170601.0.1ca0ba6-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | package winrm
import (
"time"
. "gopkg.in/check.v1"
)
func (s *WinRMSuite) TestEndpointUrlHttp(c *C) {
endpoint := &Endpoint{Host: "abc", Port: 123}
c.Assert(endpoint.url(), Equals, "http://abc:123/wsman")
}
func (s *WinRMSuite) TestEndpointUrlHttps(c *C) {
endpoint := &Endpoint{Host: "abc", Port: 123, HTTPS: true}
c.Assert(endpoint.url(), Equals, "https://abc:123/wsman")
}
func (s *WinRMSuite) TestEndpointWithDefaultTimeout(c *C) {
endpoint := NewEndpoint("test", 5585, false, false, nil, nil, nil, 0)
c.Assert(endpoint.Timeout, Equals, 60*time.Second)
}
func (s *WinRMSuite) TestEndpointWithTimeout(c *C) {
endpoint := NewEndpoint("test", 5585, false, false, nil, nil, nil, 120*time.Second)
c.Assert(endpoint.Timeout, Equals, 120*time.Second)
}
|