Home Download Docs Code Community
import "perkeep/pkg/importer/test"
Overview
Index

Overview ▾

Package test provides common functionality for importer tests.

Index

func FindChildRefs(parent *importer.Object) ([]blob.Ref, error)
func GetRequiredChildPathObj(parent *importer.Object, path string) (*importer.Object, error)
func ImporterTest(t *testing.T, importerName string, transport http.RoundTripper, fn func(*importer.RunContext))

Package files

helpers.go

func FindChildRefs

func FindChildRefs(parent *importer.Object) ([]blob.Ref, error)

FindChildRefs returns the children of an importer.Object

func GetRequiredChildPathObj

func GetRequiredChildPathObj(parent *importer.Object, path string) (*importer.Object, error)

GetRequiredChildPathObj returns the child object at path or an error if none exists.

func ImporterTest

func ImporterTest(t *testing.T, importerName string, transport http.RoundTripper, fn func(*importer.RunContext))

ImporterTest sets up the environment for an importer integration test.

Website layout inspired by memcached.
Content by the authors.