test

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

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