Documentation ¶
Overview ¶
Package testutil contains test utilities for krew.
Index ¶
- type P
- type R
- func (p *R) V() index.Platform
- func (p *R) WithBin(v string) *R
- func (p *R) WithFiles(v []index.FileOperation) *R
- func (p *R) WithOS(os string) *R
- func (p *R) WithOSArch(os, arch string) *R
- func (p *R) WithOSes(os ...string) *R
- func (p *R) WithSHA256(v string) *R
- func (p *R) WithSelector(v *metav1.LabelSelector) *R
- func (p *R) WithURI(v string) *R
- type Receipt
- type TempDir
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type P ¶
type P struct {
// contains filtered or unexported fields
}
func (*P) WithShortDescription ¶
func (*P) WithVersion ¶
type R ¶
type R struct {
// contains filtered or unexported fields
}
func NewPlatform ¶
func NewPlatform() *R
func (*R) WithOSArch ¶
func (*R) WithSHA256 ¶
func (*R) WithSelector ¶
func (p *R) WithSelector(v *metav1.LabelSelector) *R
type Receipt ¶ added in v0.4.0
type Receipt struct {
// contains filtered or unexported fields
}
func NewReceipt ¶ added in v0.4.0
func NewReceipt() *Receipt
NewReceipt builds an index.Receipt that is valid.
func (*Receipt) WithStatus ¶ added in v0.4.0
func (r *Receipt) WithStatus(s index.ReceiptStatus) *Receipt
type TempDir ¶
type TempDir struct {
// contains filtered or unexported fields
}
func NewTempDir ¶
NewTempDir creates a temporary directory which is automatically cleaned up when the test exits.
func (*TempDir) InitEmptyGitRepo ¶ added in v0.4.0
func (*TempDir) Path ¶
Path returns the path to a file in the temp directory. The input file is expected to use '/' as directory separator regardless of the host OS.
Click to show internal directories.
Click to hide internal directories.