package testsuite

import "github.com/containerd/containerd/content/testsuite"

Index

Functions

func ContentCrossNSIsolatedSuite

func ContentCrossNSIsolatedSuite(t *testing.T, name string, storeFn StoreInitFn)

ContentCrossNSIsolatedSuite runs a test suite under isolated content policy

func ContentCrossNSSharedSuite

func ContentCrossNSSharedSuite(t *testing.T, name string, storeFn StoreInitFn)

ContentCrossNSSharedSuite runs a test suite under shared content policy

func ContentSuite

func ContentSuite(t *testing.T, name string, storeFn StoreInitFn)

ContentSuite runs a test suite on the content store given a factory function.

func Name

func Name(ctx context.Context) string

Name gets the test name from the context

func SetContextWrapper

func SetContextWrapper(ctx context.Context, w ContextWrapper) context.Context

SetContextWrapper sets the wrapper on the context for deriving new test contexts from the context.

Types

type ContextWrapper

type ContextWrapper func(ctx context.Context) (context.Context, func(context.Context) error, error)

ContextWrapper is used to decorate new context used inside the test before using the context on the content store. This can be used to support leasing and multiple namespaces tests.

type StoreInitFn

type StoreInitFn func(ctx context.Context, root string) (context.Context, content.Store, func() error, error)

StoreInitFn initializes content store with given root and returns a function for destroying the content store

Source Files

testsuite.go

Version
v1.6.30
Published
Mar 11, 2024
Platform
js/wasm
Imports
17 packages
Last checked
5 minutes ago

Tools for package owners.