コード例 #1
0
ファイル: wss_test.go プロジェクト: kildevaeld/projects
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package wss

import (
	"testing"

	"github.com/kildevaeld/projects/cmd/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "wss://127.0.0.1:3346/mysock")

func TestWSSListenAndAccept(t *testing.T) {
	tt.TestListenAndAccept(t)
}

func TestWSSDuplicateListen(t *testing.T) {
	tt.TestDuplicateListen(t)
}

func TestWSSConnRefused(t *testing.T) {
	tt.TestConnRefused(t)
}

func TestWSSSendRecv(t *testing.T) {
	tt.TestSendRecv(t)
コード例 #2
0
ファイル: ipc_test.go プロジェクト: kildevaeld/projects
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package ipc

import (
	"runtime"
	"testing"

	"github.com/kildevaeld/projects/cmd/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "ipc:///tmp/test1234")

func TestIpcListenAndAccept(t *testing.T) {
	switch runtime.GOOS {
	case "windows":
		t.Skip("IPC not supported on Windows")
	case "plan9":
		t.Skip("IPC not supported on Plan9")
	default:
		tt.TestListenAndAccept(t)
	}
}

func TestIpcDuplicateListen(t *testing.T) {
	switch runtime.GOOS {
	case "windows":
コード例 #3
0
ファイル: tls_test.go プロジェクト: kildevaeld/projects
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package tlstcp

import (
	"testing"

	"github.com/kildevaeld/projects/cmd/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "tls+tcp://127.0.0.1:3334")

func TestTLSListenAndAccept(t *testing.T) {
	tt.TestListenAndAccept(t)
}

func TestTLSDuplicateListen(t *testing.T) {
	tt.TestDuplicateListen(t)
}

func TestTLSConnRefused(t *testing.T) {
	tt.TestConnRefused(t)
}

func TestTLSSendRecv(t *testing.T) {
	tt.TestSendRecv(t)
コード例 #4
0
ファイル: inproc_test.go プロジェクト: kildevaeld/projects
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package inproc

import (
	"testing"

	"github.com/kildevaeld/projects/cmd/Godeps/_workspace/src/github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "inproc://testname")

func TestInpListenAndAccept(t *testing.T) {
	tt.TestListenAndAccept(t)
}

func TestInpDuplicateListen(t *testing.T) {
	tt.TestDuplicateListen(t)
}

func TestInpConnRefused(t *testing.T) {
	tt.TestConnRefused(t)
}

func TestInpSendRecv(t *testing.T) {
	tt.TestSendRecv(t)