testutil

package
v5.10.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2019 License: MIT, MIT, MIT, + 2 more Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithStore

func RunWithStore(fn func(store.Store)) error

RunWithStore starts new isolated etcd store, defers teardown and then runs given closure with store.

Ex.

  RunWithStore(func (store store.Store) {
    err := store.CreateCheck(...)
    assert.NoError(err)
  })

Types

type IntegrationTestStore

type IntegrationTestStore struct {
	*etcdstore.Store
	// contains filtered or unexported fields
}

IntegrationTestStore wrapper for etcd & store

func NewStoreInstance

func NewStoreInstance() (*IntegrationTestStore, error)

NewStoreInstance returns new isolated store

func (*IntegrationTestStore) GetStore

func (e *IntegrationTestStore) GetStore() store.Store

GetStore return etcd client

func (*IntegrationTestStore) Teardown

func (e *IntegrationTestStore) Teardown()

Teardown etcd and remove temp directory

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL