"fmt" "io/ioutil" "net/http" "path/filepath" "strings" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" cf "github.com/st3v/cfkit/integration_test/cfhelper" ) var _ = Describe("RabbitMQ Service", func() { var ( app = cf.RandomAppName() route = fmt.Sprintf("http://%s.%s", app, cf.Domain()) serviceID = cf.RandomServiceID() serviceName = cf.RabbitServiceName() servicePlan = cf.RabbitServicePlan() ) BeforeEach(func() { manifestPath := filepath.Join(".", "rabbit-test-app", "manifest.yml") Expect(cf.PushAppManifest(app, manifestPath)).To(Succeed()) Expect(cf.CreateService( serviceName, servicePlan, serviceID, )).To(Succeed())
func TestEnv(t *testing.T) { log.SetOutput(GinkgoWriter) RegisterFailHandler(Fail) RunSpecs(t, "Env Integration Suite") } var _ = Describe("Env", func() { var ( api = cf.API() username = cf.Username() password = cf.Password() org = cf.Org() space = cf.RandomSpaceName() app = cf.RandomAppName() route = fmt.Sprintf("http://%s.%s", app, cf.Domain()) serviceID = cf.RandomServiceID() servicePayload = map[string]interface{}{"uri": "some-uri"} ) BeforeSuite(func() { Expect(cf.Login(api, username, password)).To(Succeed()) Expect(cf.TargetOrg(org)).To(Succeed()) Expect(cf.CreateSpace(space)).To(Succeed()) Expect(cf.TargetSpace(space)).To(Succeed()) manifestPath := filepath.Join(".", "env-test-app", "manifest.yml") Expect(cf.PushAppManifest(app, manifestPath)).To(Succeed()) Expect(cf.CreateUserService(serviceID, servicePayload)).To(Succeed())