dbtest

package
v0.69.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveDir

func ArchiveDir(t *testing.T, dir string) string

func Close

func Close() error

func InitDB

func InitDB(t *testing.T, fixtureFiles []string) string

InitDB initializes testing database.

func InitJavaDB

func InitJavaDB(t *testing.T, cacheDir string)

func InitWithMetadata added in v0.68.0

func InitWithMetadata(t *testing.T, meta metadata.Metadata, createDBFile bool) string

InitWithMetadata initializes a database with optional metadata and DB file creation. If meta is empty, no metadata file is created. If createDBFile is false, no DB file is created (useful for testing "DB not found" scenarios). Returns the dbDir path.

func NewFakeDB

func NewFakeDB(t *testing.T, dbPath string, opts FakeDBOptions) *oci.Artifact

func NewFakeLayer

func NewFakeLayer(t *testing.T, input string, mediaType types.MediaType) v1.Layer

Types

type FakeDBOptions

type FakeDBOptions struct {
	MediaType types.MediaType
}

Jump to

Keyboard shortcuts

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