e2e

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAPISwarm

func MakeAPISwarm(ctx context.Context) ([]coreiface.CoreAPI, func(), error)

this function is in a test package in ipfs, so i copy pasted it here with minor modifications

func ToIpfsDir

func ToIpfsDir(filesys fs.FS, name string) files.Directory

Types

type TestDriverFactory

type TestDriverFactory struct {
	Api              coreiface.CoreAPI
	IpnsKey          string
	IpnsReadOnlyKeys []string
	Ctx              context.Context
	// contains filtered or unexported fields
}

I created this test factory so i can better control the create code for example, pass context to the driver, so i can cancel it for the restart test.

func (*TestDriverFactory) Create

func (s *TestDriverFactory) Create(parameters map[string]interface{}) (storagedriver.StorageDriver, error)

type TestRegistry

type TestRegistry struct {
	Done chan struct{}
	// contains filtered or unexported fields
}

there is no good way of stopping docker registry, So i copied a simplified version of it and added shutdown method.

func NewRegistry

func NewRegistry(ctx context.Context, config *configuration.Configuration) (*TestRegistry, error)

NewRegistry creates a new registry from a context and configuration struct.

func (*TestRegistry) ListenAndServe

func (registry *TestRegistry) ListenAndServe() error

ListenAndServe runs the registry's HTTP server.

func (*TestRegistry) Shutdown

func (registry *TestRegistry) Shutdown() error

Jump to

Keyboard shortcuts

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