testutils

package
v0.0.0-...-d3da680 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package testutils is a library containing helpers for testing cipkg.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert[T any](tb testing.TB, x any) T

func NewMockPackageManage

func NewMockPackageManage(tempDir string) core.PackageManager

Types

type MockPackageHandler

type MockPackageHandler struct {
	// contains filtered or unexported fields
}

func (*MockPackageHandler) Build

func (p *MockPackageHandler) Build(f func() error) error

func (*MockPackageHandler) DecRef

func (p *MockPackageHandler) DecRef() error

func (*MockPackageHandler) IncRef

func (p *MockPackageHandler) IncRef() error

func (*MockPackageHandler) LoggingDirectory

func (p *MockPackageHandler) LoggingDirectory() string

func (*MockPackageHandler) OutputDirectory

func (p *MockPackageHandler) OutputDirectory() string

func (*MockPackageHandler) TryRemove

func (p *MockPackageHandler) TryRemove() (ok bool, err error)

type MockPackageManager

type MockPackageManager struct {
	// contains filtered or unexported fields
}

MockPackageManager implements core.PackageManager interface. It stores metadata and derivation in the memory. It doesn't allocate any "real" storage in the filesystem.

func (*MockPackageManager) Get

Jump to

Keyboard shortcuts

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