File: inmem_transport_test.go

package info (click to toggle)
golang-github-hashicorp-raft 1.0.0%2Bgit20180823.82694fb-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 704 kB
  • sloc: makefile: 17; sh: 9
file content (18 lines) | stat: -rw-r--r-- 412 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package raft

import (
	"testing"
)

func TestInmemTransportImpl(t *testing.T) {
	var inm interface{} = &InmemTransport{}
	if _, ok := inm.(Transport); !ok {
		t.Fatalf("InmemTransport is not a Transport")
	}
	if _, ok := inm.(LoopbackTransport); !ok {
		t.Fatalf("InmemTransport is not a Loopback Transport")
	}
	if _, ok := inm.(WithPeers); !ok {
		t.Fatalf("InmemTransport is not a WithPeers Transport")
	}
}