buildermock

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBuilder

type MockBuilder struct {
	Received  []*build.Definition
	Requested []time.Time
}

MockBuilder can be used to test a server.Server without having real builder.

func (*MockBuilder) Build

func (m *MockBuilder) Build(def *build.Definition) error

Build adds the given def to our slice of Received.

func (*MockBuilder) Status

func (m *MockBuilder) Status() []build.Status

Status returns a status for everything sent to Build, assuming you pushed a corresponding timestamp to our Requested slice manually.

Jump to

Keyboard shortcuts

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