示例#1
0
func TestEtcdStore(t *testing.T) {
	server, err := embeddedetcd.NewSimpleEtcd()
	require.Nil(t, err)
	defer func() { require.Nil(t, server.Destroy()) }()

	c, err := etcd.New(etcd.Config{Endpoints: []string{
		fmt.Sprintf("http://localhost:%d", server.Port)}})
	require.Nil(t, err)
	test.RunStoreTestSuite(newEtcdStore(etcdutil.NewClient(c)), t)
}
示例#2
0
func TestInMemStore(t *testing.T) {
	test.RunStoreTestSuite(&testableInMemStore{}, t)
}