Exemplo n.º 1
0
//
// 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/go-mangos/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)
Exemplo n.º 2
0
//
// 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/go-mangos/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)
Exemplo n.º 3
0
//
// 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/go-mangos/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)
Exemplo n.º 4
0
// 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/go-mangos/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":