sntest

package
v1.126.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRPCDialer

func CreateRPCDialer() (rpc.Dialer, error)

CreateRPCDialer creates an RPC dialer with a new identity and TLS configuration. It configures the dialer with minimal security settings suitable for testing.

func DownloadPiece

func DownloadPiece(ctx context.Context, t *testing.T, signer signing.Signer, nodeURL storj.NodeURL, pieceID storj.PieceID, size int64) (data []byte)

DownloadPiece downloads a piece from a storage node. It creates an order limit for downloading, signs it, and retrieves the data. Returns the downloaded data as a byte slice.

func InitStoragenodeDirs

func InitStoragenodeDirs(t *testing.T, id storj.NodeID, config *piecestore2.OldConfig)

InitStoragenodeDirs initializes the directory structure required for a storage node. It creates the necessary directories and writes a verification file with the node ID.

func UploadPiece

func UploadPiece(ctx context.Context, t *testing.T, signer signing.Signer, nodeURL storj.NodeURL, data []byte) (id storj.PieceID)

UploadPiece uploads a piece of data to a storage node. It creates an order limit, signs it, and uploads the data to the specified node URL. Returns the generated piece ID.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳