示例#1
0
import (
	"github.com/brahmaroutu/docker-broker/broker/brokerapi"
	"github.com/brahmaroutu/docker-broker/broker/dockerapi"
	"github.com/brahmaroutu/docker-broker/broker/testhelpers"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	"fmt"
	"net/http"
	"net/http/httptest"
	"time"
)

var _ = Describe("Dockerclient", func() {
	var brokerservice *dockerapi.DockerClient
	var serviceagent brokerapi.ServiceAgent
	var persister brokerapi.Persister
	var cm dockerapi.BrokerConfiguration
	var ts *httptest.Server
	var handler *testnet.TestHandler
	var err error

	Describe("brokertest test dockerclient", func() {
		BeforeEach(func() {
			serviceagent = testnet.NewServiceAgent()
			persister = testnet.NewPersister()
			cm = testnet.BrokerConfiguration()
			testnet.SetupSQL(persister)
		})
		AfterEach(func() {
示例#2
0
package dockerapi_test

import (
	"github.com/brahmaroutu/docker-broker/broker/brokerapi"
	"github.com/brahmaroutu/docker-broker/broker/dockerapi"
	"github.com/brahmaroutu/docker-broker/broker/testhelpers"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"net/http"
	"net/http/httptest"
)

var _ = Describe("Containers", func() {
	var Cconfig dockerapi.ContainerConfig
	var brokerservice *dockerapi.DockerClient
	var serviceagent brokerapi.ServiceAgent
	var persister brokerapi.Persister
	var ts *httptest.Server
	var handler *testnet.TestHandler
	var err error
	JustBeforeEach(func() {
		var vols, exposedports map[string]struct{}
		Cconfig = dockerapi.ContainerConfig{
			Hostname:     "",
			User:         "",
			Memory:       0,
			MemorySwap:   0,
			AttachStdin:  false,
			AttachStdout: true,
			AttachStderr: true,
			PortSpecs:    nil,