Documentation
¶
Index ¶
- Variables
- func CheckCreateNet(net string) (string, error)
- func DockerCleanUp(ctx context.Context, dockerClient *client.Client, net string) error
- func GetImage(image string) string
- func GetServiceID(ctx context.Context, dockerClient *client.Client, name string) string
- func KillService(ctx context.Context, dockerClient *client.Client, svcID string)
- func StartBrain(ctx context.Context, t *testing.T, dockerClient *client.Client, ...) (*r.Session, string, error)
- func StartIntegrationTestService(ctx context.Context, dockerClient *client.Client, spec swarm.ServiceSpec) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var BrainSpec = swarm.ServiceSpec{ Annotations: swarm.Annotations{ Name: "rethinkdb", }, TaskTemplate: swarm.TaskSpec{ ContainerSpec: swarm.ContainerSpec{ DNSConfig: &swarm.DNSConfig{}, Image: GetImage("ramrodpcp/database-brain"), }, RestartPolicy: &swarm.RestartPolicy{ Condition: "on-failure", }, }, EndpointSpec: &swarm.EndpointSpec{ Mode: swarm.ResolutionModeVIP, Ports: []swarm.PortConfig{swarm.PortConfig{ Protocol: swarm.PortConfigProtocolTCP, TargetPort: 28015, PublishedPort: 28015, PublishMode: swarm.PortConfigPublishModeIngress, }}, }, }
View Source
var GenericPluginConfig = swarm.ServiceSpec{ Annotations: swarm.Annotations{ Name: "Harness-5000tcp", Labels: map[string]string{ "os": "posix", }, }, TaskTemplate: swarm.TaskSpec{ ContainerSpec: swarm.ContainerSpec{ Env: []string{ "PLUGIN=Harness", "PORT=5000", "LOGLEVEL=DEBUG", "STAGE=DEV", "PLUGIN_NAME=Harness-5000tcp", }, Image: "ramrodpcp/interpreter-plugin:" + getTagFromEnv(), }, RestartPolicy: &swarm.RestartPolicy{ Condition: "on-failure", }, }, UpdateConfig: &swarm.UpdateConfig{ Parallelism: 0, Delay: 0, }, EndpointSpec: &swarm.EndpointSpec{ Mode: swarm.ResolutionModeVIP, Ports: []swarm.PortConfig{ swarm.PortConfig{ Protocol: swarm.PortConfigProtocolTCP, PublishedPort: 5000, TargetPort: 5000, PublishMode: swarm.PortConfigPublishModeHost, }, }, }, }
Functions ¶
func CheckCreateNet ¶
CheckCreateNet checks to see if the given network is created and creates it if it is not
func DockerCleanUp ¶
DockerCleanUp removes all services and containers
func GetServiceID ¶
GetServiceID Gets the service ID of a service given the name of the service
func KillService ¶
KillService Kills a docker service
func StartBrain ¶
func StartBrain(ctx context.Context, t *testing.T, dockerClient *client.Client, spec swarm.ServiceSpec) (*r.Session, string, error)
StartBrain starts an instance of the Brain module and returns a connection (*Session) to it
func StartIntegrationTestService ¶
func StartIntegrationTestService(ctx context.Context, dockerClient *client.Client, spec swarm.ServiceSpec) (string, error)
StartIntegrationTestService starts a service for the integration test
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.