Version: v0.0.0-...-c495639 Latest Latest

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

Go to latest
Published: Jan 18, 2020 License: GPL-3.0 Imports: 9 Imported by: 0



Package test provides functions that are used for testing GlobalStorer implementations.



This section is empty.


This section is empty.


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

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.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL