示例#1
0
文件: common.go 项目: xtracdev/xavi
func createMountebankTestContainerContext() *testcontainer.ContainerContext {
	containerCtx := testcontainer.ContainerContext{
		ImageName: "mb-server-alpine",
	}

	containerCtx.Labels = make(map[string]string)
	containerCtx.Labels["xt-container-type"] = "atest-mb"

	containerCtx.PortContext = make(map[string]string)
	containerCtx.PortContext["2525/tcp"] = "2626"

	return &containerCtx
}
示例#2
0
文件: common.go 项目: xtracdev/xavi
func createXaviTestContainerContext(linkedContainerName string) *testcontainer.ContainerContext {
	containerCtx := testcontainer.ContainerContext{
		ImageName: "xavi-test-alpine-base",
	}

	containerCtx.Labels = make(map[string]string)
	containerCtx.Labels["xt-container-type"] = "atest-xavi"

	containerCtx.PortContext = make(map[string]string)
	containerCtx.PortContext["2525/tcp"] = "2525"
	containerCtx.PortContext["8080/tcp"] = "8080"
	containerCtx.PortContext["9000/tcp"] = "9000"

	containerCtx.Links = append(containerCtx.Links, fmt.Sprintf("%s:mbhost", linkedContainerName[1:]))
	log.Println(fmt.Sprintf("%v", containerCtx.Links))

	return &containerCtx
}