testing

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: BSD-3-Clause Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FixtureChunk added in v0.4.1

func FixtureChunk(prefix string) swarm.Chunk

FixtureChunk gets a pregenerated content-addressed chunk and panics if one is not found.

func GenerateTestRandomChunk

func GenerateTestRandomChunk() swarm.Chunk

GenerateTestRandomChunk generates a valid content addressed chunk.

func GenerateTestRandomChunkAt added in v0.6.0

func GenerateTestRandomChunkAt(tb testing.TB, target swarm.Address, po int) swarm.Chunk

GenerateTestRandomChunkAt generates an invalid (!) chunk with address of proximity order po wrt target.

func GenerateTestRandomChunks

func GenerateTestRandomChunks(count int) []swarm.Chunk

GenerateTestRandomChunks generates a slice of random Chunks by using GenerateTestRandomChunk function.

func GenerateTestRandomInvalidChunk added in v0.4.1

func GenerateTestRandomInvalidChunk() swarm.Chunk

GenerateTestRandomInvalidChunk generates a random, however invalid, content addressed chunk.

func GenerateTestRandomSoChunk added in v1.17.0

func GenerateTestRandomSoChunk(tb testing.TB, cac swarm.Chunk) swarm.Chunk

GenerateTestRandomSoChunk generates a valid single owner chunk using supplied content addressed chunk.

func GenerateValidRandomChunkAt added in v1.10.0

func GenerateValidRandomChunkAt(target swarm.Address, po int) swarm.Chunk

GenerateTestRandomChunkAt generates an invalid (!) chunk with address of proximity order po wrt target.

Types

This section is empty.

Jump to

Keyboard shortcuts

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