Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TimeOut = 5 * time.Second
)
Functions ¶
func MustParseRevInfo ¶
func MustParseRevInfo(t *testing.T, sr *path_mgmt.SignedRevInfo)
func TestRevCache ¶
func TestRevCache(t *testing.T, revCache TestableRevCache)
TestRevCache should be used to test any implementation of the RevCache interface.
setup should return a RevCache in a clean state, i.e. no entries in the cache. cleanup can be used to release any resources that have been allocated during setup.
Types ¶
type TestableRevCache ¶
type TestableRevCache interface { revcache.RevCache // InsertExpired should insert the given expired revocation. // The testing parameter should be used to fail in case of an error. // The method is used to test if expired revocations are not returned. InsertExpired(t *testing.T, ctx context.Context, rev *path_mgmt.SignedRevInfo) // Prepare should reset the internal state so that the cache is empty and is ready to be tested. Prepare(t *testing.T, ctx context.Context) }
TestableRevCache extends the RevCache interface with methods that are needed for testing.
Click to show internal directories.
Click to hide internal directories.