Documentation ¶
Overview ¶
Package testing provides useful tools for testing Store implementations.
Index ¶
- func TestUnmarshal(c *gc.C, configYAML string)
- type KeyValueSuite
- func (s *KeyValueSuite) SetUpSuite(c *gc.C)
- func (s *KeyValueSuite) SetUpTest(c *gc.C)
- func (s *KeyValueSuite) TearDownSuite(c *gc.C)
- func (s *KeyValueSuite) TearDownTest(c *gc.C)
- func (s *KeyValueSuite) TestGetNotFound(c *gc.C)
- func (s *KeyValueSuite) TestSet(c *gc.C)
- func (s *KeyValueSuite) TestSetKeyOnce(c *gc.C)
- func (s *KeyValueSuite) TestSetKeyOnceDuplicate(c *gc.C)
- func (s *KeyValueSuite) TestSetNilUpdatesAsNonNil(c *gc.C)
- func (s *KeyValueSuite) TestTwoStoresForDifferentIDPsAreIndependent(c *gc.C)
- func (s *KeyValueSuite) TestTwoStoresForTheSameIDPCommunicate(c *gc.C)
- func (s *KeyValueSuite) TestUpdateConcurrent(c *gc.C)
- func (s *KeyValueSuite) TestUpdateErrorWithExistingKey(c *gc.C)
- func (s *KeyValueSuite) TestUpdateErrorWithNonExistentKey(c *gc.C)
- func (s *KeyValueSuite) TestUpdateReturnNilThenUpdatesAsNonNil(c *gc.C)
- func (s *KeyValueSuite) TestUpdateSuccessWithPreexistingKey(c *gc.C)
- func (s *KeyValueSuite) TestUpdateSuccessWithoutPreexistingKey(c *gc.C)
- type MeetingSuite
- func (s *MeetingSuite) SetUpSuite(c *gc.C)
- func (s *MeetingSuite) SetUpTest(c *gc.C)
- func (s *MeetingSuite) TearDownSuite(c *gc.C)
- func (s *MeetingSuite) TearDownTest(c *gc.C)
- func (s *MeetingSuite) TestContext(c *gc.C)
- func (s *MeetingSuite) TestPutGetRemove(c *gc.C)
- func (s *MeetingSuite) TestPutSameIDTwice(c *gc.C)
- func (s *MeetingSuite) TestRemoveNothingRemoved(c *gc.C)
- func (s *MeetingSuite) TestRemoveOld(c *gc.C)
- type StoreSuite
- func (s *StoreSuite) SetUpSuite(c *gc.C)
- func (s *StoreSuite) SetUpTest(c *gc.C)
- func (s *StoreSuite) TearDownSuite(c *gc.C)
- func (s *StoreSuite) TearDownTest(c *gc.C)
- func (s *StoreSuite) TestFindIdentities(c *gc.C)
- func (s *StoreSuite) TestIdentity(c *gc.C)
- func (s *StoreSuite) TestIdentityCounts(c *gc.C)
- func (s *StoreSuite) TestIdentityNotFound(c *gc.C)
- func (s *StoreSuite) TestIdentityNotFoundBadID(c *gc.C)
- func (s *StoreSuite) TestIdentityNotFoundNoQuery(c *gc.C)
- func (s *StoreSuite) TestInsertDuplicateUsername(c *gc.C)
- func (s *StoreSuite) TestUpdateIDDuplicateUsername(c *gc.C)
- func (s *StoreSuite) TestUpdateIDEmpty(c *gc.C)
- func (s *StoreSuite) TestUpdateIdentity(c *gc.C)
- func (s *StoreSuite) TestUpdateNotFoundNoQuery(c *gc.C)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestUnmarshal ¶
Types ¶
type KeyValueSuite ¶
type KeyValueSuite struct {
Store store.ProviderDataStore
}
KeyValueSuite contains a set of tests for KeyValueStore implementations. The Store parameter need to be set before calling SetUpTest.
func (*KeyValueSuite) SetUpSuite ¶
func (s *KeyValueSuite) SetUpSuite(c *gc.C)
func (*KeyValueSuite) SetUpTest ¶
func (s *KeyValueSuite) SetUpTest(c *gc.C)
func (*KeyValueSuite) TearDownSuite ¶
func (s *KeyValueSuite) TearDownSuite(c *gc.C)
func (*KeyValueSuite) TearDownTest ¶
func (s *KeyValueSuite) TearDownTest(c *gc.C)
func (*KeyValueSuite) TestGetNotFound ¶
func (s *KeyValueSuite) TestGetNotFound(c *gc.C)
func (*KeyValueSuite) TestSet ¶
func (s *KeyValueSuite) TestSet(c *gc.C)
func (*KeyValueSuite) TestSetKeyOnce ¶
func (s *KeyValueSuite) TestSetKeyOnce(c *gc.C)
func (*KeyValueSuite) TestSetKeyOnceDuplicate ¶
func (s *KeyValueSuite) TestSetKeyOnceDuplicate(c *gc.C)
func (*KeyValueSuite) TestSetNilUpdatesAsNonNil ¶
func (s *KeyValueSuite) TestSetNilUpdatesAsNonNil(c *gc.C)
func (*KeyValueSuite) TestTwoStoresForDifferentIDPsAreIndependent ¶
func (s *KeyValueSuite) TestTwoStoresForDifferentIDPsAreIndependent(c *gc.C)
func (*KeyValueSuite) TestTwoStoresForTheSameIDPCommunicate ¶
func (s *KeyValueSuite) TestTwoStoresForTheSameIDPCommunicate(c *gc.C)
func (*KeyValueSuite) TestUpdateConcurrent ¶
func (s *KeyValueSuite) TestUpdateConcurrent(c *gc.C)
func (*KeyValueSuite) TestUpdateErrorWithExistingKey ¶
func (s *KeyValueSuite) TestUpdateErrorWithExistingKey(c *gc.C)
func (*KeyValueSuite) TestUpdateErrorWithNonExistentKey ¶
func (s *KeyValueSuite) TestUpdateErrorWithNonExistentKey(c *gc.C)
func (*KeyValueSuite) TestUpdateReturnNilThenUpdatesAsNonNil ¶
func (s *KeyValueSuite) TestUpdateReturnNilThenUpdatesAsNonNil(c *gc.C)
func (*KeyValueSuite) TestUpdateSuccessWithPreexistingKey ¶
func (s *KeyValueSuite) TestUpdateSuccessWithPreexistingKey(c *gc.C)
func (*KeyValueSuite) TestUpdateSuccessWithoutPreexistingKey ¶
func (s *KeyValueSuite) TestUpdateSuccessWithoutPreexistingKey(c *gc.C)
type MeetingSuite ¶
type MeetingSuite struct { Store meeting.Store PutAtTimeFunc func(context.Context, meeting.Store, string, string, time.Time) error // contains filtered or unexported fields }
MeetingSuite contains a set of tests for meeting.Store implementations. The Store and PutAtTimeFunc parameters need to be set before calling SetUpTest.
func (*MeetingSuite) SetUpSuite ¶
func (s *MeetingSuite) SetUpSuite(c *gc.C)
func (*MeetingSuite) SetUpTest ¶
func (s *MeetingSuite) SetUpTest(c *gc.C)
func (*MeetingSuite) TearDownSuite ¶
func (s *MeetingSuite) TearDownSuite(c *gc.C)
func (*MeetingSuite) TearDownTest ¶
func (s *MeetingSuite) TearDownTest(c *gc.C)
func (*MeetingSuite) TestContext ¶
func (s *MeetingSuite) TestContext(c *gc.C)
func (*MeetingSuite) TestPutGetRemove ¶
func (s *MeetingSuite) TestPutGetRemove(c *gc.C)
func (*MeetingSuite) TestPutSameIDTwice ¶
func (s *MeetingSuite) TestPutSameIDTwice(c *gc.C)
func (*MeetingSuite) TestRemoveNothingRemoved ¶
func (s *MeetingSuite) TestRemoveNothingRemoved(c *gc.C)
func (*MeetingSuite) TestRemoveOld ¶
func (s *MeetingSuite) TestRemoveOld(c *gc.C)
type StoreSuite ¶
StoreSuite contains a set of tests for Store implementations. The Store parameter need to be set before calling SetUpTest.
func (*StoreSuite) SetUpSuite ¶
func (s *StoreSuite) SetUpSuite(c *gc.C)
func (*StoreSuite) SetUpTest ¶
func (s *StoreSuite) SetUpTest(c *gc.C)
func (*StoreSuite) TearDownSuite ¶
func (s *StoreSuite) TearDownSuite(c *gc.C)
func (*StoreSuite) TearDownTest ¶
func (s *StoreSuite) TearDownTest(c *gc.C)
func (*StoreSuite) TestFindIdentities ¶
func (s *StoreSuite) TestFindIdentities(c *gc.C)
func (*StoreSuite) TestIdentity ¶
func (s *StoreSuite) TestIdentity(c *gc.C)
func (*StoreSuite) TestIdentityCounts ¶
func (s *StoreSuite) TestIdentityCounts(c *gc.C)
func (*StoreSuite) TestIdentityNotFound ¶
func (s *StoreSuite) TestIdentityNotFound(c *gc.C)
func (*StoreSuite) TestIdentityNotFoundBadID ¶
func (s *StoreSuite) TestIdentityNotFoundBadID(c *gc.C)
func (*StoreSuite) TestIdentityNotFoundNoQuery ¶
func (s *StoreSuite) TestIdentityNotFoundNoQuery(c *gc.C)
func (*StoreSuite) TestInsertDuplicateUsername ¶
func (s *StoreSuite) TestInsertDuplicateUsername(c *gc.C)
func (*StoreSuite) TestUpdateIDDuplicateUsername ¶
func (s *StoreSuite) TestUpdateIDDuplicateUsername(c *gc.C)
func (*StoreSuite) TestUpdateIDEmpty ¶
func (s *StoreSuite) TestUpdateIDEmpty(c *gc.C)
func (*StoreSuite) TestUpdateIdentity ¶
func (s *StoreSuite) TestUpdateIdentity(c *gc.C)
func (*StoreSuite) TestUpdateNotFoundNoQuery ¶
func (s *StoreSuite) TestUpdateNotFoundNoQuery(c *gc.C)
Click to show internal directories.
Click to hide internal directories.