Ejemplo n.º 1
0
package rainmaker_test

import (
	"github.com/pivotal-cf-experimental/rainmaker"

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

var _ = Describe("SpacesService", func() {
	var (
		config    rainmaker.Config
		service   rainmaker.SpacesService
		token     string
		spaceName string
		org1      rainmaker.Organization
		org2      rainmaker.Organization
	)

	BeforeEach(func() {
		var err error
		token = "token-asd"
		config = rainmaker.Config{
			Host: fakeCloudController.URL(),
		}
		service = rainmaker.NewSpacesService(config)
		spaceName = "my-space"

		org1, err = rainmaker.NewOrganizationsService(config).Create("org-123", token)
		Expect(err).NotTo(HaveOccurred())
Ejemplo n.º 2
0
package rainmaker_test

import (
	"github.com/pivotal-cf-experimental/rainmaker"

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

var _ = Describe("SpacesService", func() {
	var config rainmaker.Config
	var service *rainmaker.SpacesService
	var token, spaceName string
	var org rainmaker.Organization

	BeforeEach(func() {
		var err error
		token = "token-asd"
		config = rainmaker.Config{
			Host: fakeCloudController.URL(),
		}
		service = rainmaker.NewSpacesService(config)
		spaceName = "my-space"

		org, err = rainmaker.NewOrganizationsService(config).Create("org-123", token)
		if err != nil {
			panic(err)
		}
	})

	Describe("Create/Get", func() {