Documentation ¶
Overview ¶
Package testutils is a library containing helpers for testing cipkg.
Index ¶
- func Assert[T any](tb testing.TB, x any) T
- func NewMockPackageManage(tempDir string) core.PackageManager
- type MockPackageHandler
- func (p *MockPackageHandler) Build(f func() error) error
- func (p *MockPackageHandler) DecRef() error
- func (p *MockPackageHandler) IncRef() error
- func (p *MockPackageHandler) LoggingDirectory() string
- func (p *MockPackageHandler) OutputDirectory() string
- func (p *MockPackageHandler) TryRemove() (ok bool, err error)
- type MockPackageManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func (pm *MockPackageManager) Get(id string) core.PackageHandler
Click to show internal directories.
Click to hide internal directories.