testutil

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Collection of resources for teting mesos artifacts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMesosClient

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

MockMesosClient Http client to communicate with mesos processes (master,sched,exec)

func NewMockMesosClient

func NewMockMesosClient(t *testing.T, pid *upid.UPID) *MockMesosClient

func (*MockMesosClient) SendMessage

func (c *MockMesosClient) SendMessage(targetPid *upid.UPID, message proto.Message)

sendMessage Mocks sending event messages to a processes such as master, sched or exec.

type MockMesosHttpServer

type MockMesosHttpServer struct {
	PID  *upid.UPID
	Addr string
	// contains filtered or unexported fields
}

MockMesosHttpProcess represents a remote http process: master or slave.

func NewMockMasterHttpServer

func NewMockMasterHttpServer(t *testing.T, handler func(rsp http.ResponseWriter, req *http.Request)) *MockMesosHttpServer

func NewMockSlaveHttpServer

func NewMockSlaveHttpServer(t *testing.T, handler func(rsp http.ResponseWriter, req *http.Request)) *MockMesosHttpServer

func (*MockMesosHttpServer) Close

func (s *MockMesosHttpServer) Close()

func (*MockMesosHttpServer) On

func (m *MockMesosHttpServer) On(uri string) When

type When

type When interface {
	Do(http.HandlerFunc)
}

type WhenFunc

type WhenFunc func(http.HandlerFunc)

func (WhenFunc) Do

func (w WhenFunc) Do(f http.HandlerFunc)

Jump to

Keyboard shortcuts

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