Documentation ¶
Overview ¶
Package test provides functions that are used for testing GlobalStorer implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportExport ¶
func ImportExport(t *testing.T, outStore, inStore mock.GlobalStorer, n int)
ImportExport saves chunks to the outStore, exports them to the tar archive, imports tar archive to the inStore and checks if all chunks are imported correctly.
func MockStore ¶
func MockStore(t *testing.T, globalStore mock.GlobalStorer, n int)
MockStore creates NodeStore instances from provided GlobalStorer, each one with a unique address, stores different chunks on them and checks if they are retrievable or not on all nodes. Attribute n defines the number of NodeStores that will be created.
func MockStoreListings ¶ added in v1.9.0
func MockStoreListings(t *testing.T, globalStore mock.GlobalStorer, n int)
MockStoreListings tests global store methods Keys, Nodes, NodeKeys and KeyNodes. It uses a provided globalstore to put chunks for n number of node addresses and to validate that methods are returning the right responses.
Types ¶
This section is empty.