Beispiel #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 ws

import (
	"testing"

	"github.com/gdamore/mangos/test"
)

var tt = test.NewTranTest(NewTransport(), "ws://127.0.0.1:3335/mysock")

func TestWSListenAndAccept(t *testing.T) {
	tt.TranTestListenAndAccept(t)
}

func TestWSDuplicateListen(t *testing.T) {
	tt.TranTestDuplicateListen(t)
}

func TestWSConnRefused(t *testing.T) {
	tt.TranTestConnRefused(t)
}

func TestWSSendRecv(t *testing.T) {
	tt.TranTestSendRecv(t)
Beispiel #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/gdamore/mangos/test"
)

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

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

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

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

func TestInpSendRecv(t *testing.T) {
	tt.TranTestSendRecv(t)
Beispiel #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 tlstcp

import (
	"testing"

	"github.com/gdamore/mangos/test"
)

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

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

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

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

func TestTLSSendRecv(t *testing.T) {
	tt.TranTestSendRecv(t)
Beispiel #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/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.TranTestListenAndAccept(t)
	}
}

func TestIpcDuplicateListen(t *testing.T) {
	switch runtime.GOOS {
	case "windows":