<commit_before>package smoke_tests

import (
	"fmt"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/pborman/uuid"
	"github.com/pivotal-cf/cf-rabbitmq-smoke-tests/tests/helper"
)

var _ = Describe("Smoke tests", func() {

	const appName = "rmq-smoke-tests-ruby"
	const appPath = "../assets/rabbit-example-app"

	AfterEach(func() {
		helper.DeleteApp(appName)
	})

	smokeTestForPlan := func(planName string) func() {
		return func() {
			serviceName := fmt.Sprintf("rmq-smoke-test-instance-%s", uuid.New()[:18])
			helper.CreateService(testConfig.ServiceOffering, planName, serviceName)

			if useTLS {
				By("enabling TLS")
				helper.EnableTLSForODB(serviceName)
			}

			By("pushing and binding an app")
			appURL := helper.PushAndBindApp(appName, serviceName, appPath)

			By("RabbitMQ protocol")
			appEnv := helper.GetAppEnv(appName)
			if useTLS {
				Expect(appEnv).To(ContainSubstring("amqps://"), "bind should expose amqps protocol")<commit_msg>Enable TLS for ODB by creating service key and updating service<commit_after>package smoke_tests

import (
	"fmt"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"github.com/pborman/uuid"
	"github.com/pivotal-cf/cf-rabbitmq-smoke-tests/tests/helper"
)

var _ = Describe("Smoke tests", func() {

	const appName = "rmq-smoke-tests-ruby"
	const appPath = "../assets/rabbit-example-app"

	AfterEach(func() {
		helper.DeleteApp(appName)
	})

	smokeTestForPlan := func(planName string) func() {
		return func() {
			serviceName := fmt.Sprintf("rmq-smoke-test-instance-%s", uuid.New()[:18])
			helper.CreateService(testConfig.ServiceOffering, planName, serviceName)

			if useTLS && testConfig.ServiceOffering == "p.rabbitmq" {
				By("enabling TLS")
				helper.EnableTLSForODB(serviceName)
			}

			By("pushing and binding an app")
			appURL := helper.PushAndBindApp(appName, serviceName, appPath)

			By("RabbitMQ protocol")
			appEnv := helper.GetAppEnv(appName)
			if useTLS {
				Expect(appEnv).To(ContainSubstring("amqps://"), "bind should expose amqps protocol")
{'fraction_non_alphanumeric': 0.1474609375, 'fraction_numerical': 0.001953125, 'mean_word_length': 4.349869451697128, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7018168', 'n_tokens_mistral': 812, 'n_tokens_neox': 725, 'n_words': 127}