README
¶
Tilt Integration Tests
Runs the Tilt binary and ensures that services are correctly deployed.
Who You Are: A developer who has kubectl
configured to talk to an existing cluster.
What This Framework Does: Compiles the Tilt binary, deploys servers to the
tilt-integration
namespace, and cleans up when it finishes.
NOTE: The tilt-integration
namespace will NOT be deleted afterwards.
Each subdirectory is a test case driven by the file of the same name
(e.g., oneup_.go
drives the test driven by the data in oneup
).
Run the tests with
go test -tags 'integration' -timeout 30m ./integration
or
make integration
These tests will not run with the normal make test
.
On CircleCI, we run these tests against a clean Kubernetes cluster using kind. To create a single-use kind cluster locally and run the tests against it, run:
make integration-kind
Documentation
¶
Overview ¶
Integration tests that run the Tilt binary directly. See README.md for more info on how to run and write integration tests.
Index ¶
- func TiltDriverUseRandomFreePort(t testing.TB, td *TiltDriver)
- type Event
- type MemoryStatsReporter
- func (sr *MemoryStatsReporter) Close() error
- func (sr *MemoryStatsReporter) Count(name string, value int64, tags map[string]string, rate float64) error
- func (sr *MemoryStatsReporter) Incr(name string, tags map[string]string, rate float64) error
- func (sr *MemoryStatsReporter) Timing(name string, value time.Duration, tags map[string]string, rate float64) error
- type MemoryStatsServer
- type StatsReporter
- type StatsServer
- type TiltDriver
- func (d *TiltDriver) APIResources(ctx context.Context) ([]string, error)
- func (d *TiltDriver) Args(ctx context.Context, args []string, out io.Writer) error
- func (d *TiltDriver) CI(ctx context.Context, out io.Writer, args ...string) error
- func (d *TiltDriver) Down(ctx context.Context, out io.Writer) error
- func (d *TiltDriver) DumpEngine(ctx context.Context, out io.Writer) error
- func (d *TiltDriver) Get(ctx context.Context, apiType string, names ...string) ([]byte, error)
- func (d *TiltDriver) Patch(ctx context.Context, apiType string, patch string, name string) error
- func (d *TiltDriver) Up(ctx context.Context, command UpCommand, out io.Writer, args ...string) (*TiltUpResponse, error)
- type TiltDriverOption
- type TiltUpResponse
- type UpCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TiltDriverUseRandomFreePort ¶ added in v0.19.0
func TiltDriverUseRandomFreePort(t testing.TB, td *TiltDriver)
Types ¶
type MemoryStatsReporter ¶
type MemoryStatsReporter struct {
// contains filtered or unexported fields
}
func (*MemoryStatsReporter) Count ¶
func (sr *MemoryStatsReporter) Count(name string, value int64, tags map[string]string, rate float64) error
type MemoryStatsServer ¶
type MemoryStatsServer struct {
// contains filtered or unexported fields
}
func StartMemoryStatsServer ¶
func StartMemoryStatsServer() (mss *MemoryStatsServer, port int, err error)
type StatsReporter ¶ added in v0.9.5
type StatsReporter interface {
io.Closer
Timing(name string, value time.Duration, tags map[string]string, rate float64) error
Count(name string, value int64, tags map[string]string, rate float64) error
Incr(name string, tags map[string]string, rate float64) error
}
type StatsServer ¶ added in v0.9.5
type StatsServer struct {
// contains filtered or unexported fields
}
A small http server that decodes json and sends it to our metrics services
func NewStatsServer ¶ added in v0.9.5
func NewStatsServer(stats StatsReporter) StatsServer
func (StatsServer) Index ¶ added in v0.9.5
func (s StatsServer) Index(w http.ResponseWriter, r *http.Request)
type TiltDriver ¶ added in v0.10.18
type TiltDriver struct {
Environ map[string]string
// contains filtered or unexported fields
}
func NewTiltDriver ¶ added in v0.10.18
func NewTiltDriver(t testing.TB, options ...TiltDriverOption) *TiltDriver
func (*TiltDriver) APIResources ¶ added in v0.20.4
func (d *TiltDriver) APIResources(ctx context.Context) ([]string, error)
func (*TiltDriver) Args ¶ added in v0.14.0
func (d *TiltDriver) Args(ctx context.Context, args []string, out io.Writer) error
func (*TiltDriver) CI ¶ added in v0.17.9
func (d *TiltDriver) CI(ctx context.Context, out io.Writer, args ...string) error
func (*TiltDriver) Down ¶ added in v0.10.18
func (d *TiltDriver) Down(ctx context.Context, out io.Writer) error
func (*TiltDriver) DumpEngine ¶ added in v0.10.18
func (d *TiltDriver) DumpEngine(ctx context.Context, out io.Writer) error
func (*TiltDriver) Get ¶ added in v0.20.4
func (d *TiltDriver) Get(ctx context.Context, apiType string, names ...string) ([]byte, error)
type TiltDriverOption ¶ added in v0.19.0
type TiltDriverOption func(t testing.TB, td *TiltDriver)
type TiltUpResponse ¶ added in v0.10.18
type TiltUpResponse struct {
// contains filtered or unexported fields
}
func (*TiltUpResponse) KillAndDumpThreads ¶ added in v0.10.18
func (r *TiltUpResponse) KillAndDumpThreads() error
Kill the tilt process and print the goroutine/register state. Useful if you think Tilt is deadlocked but aren't sure why.
func (*TiltUpResponse) TriggerExit ¶ added in v0.22.11
func (r *TiltUpResponse) TriggerExit() error
TriggerExit sends a SIGTERM to the `tilt up` process to give it a chance to exit normally.
If the signal cannot be sent or 2 seconds have elapsed, it will be forcibly killed with SIGKILL.