<commit_before>package apps

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	. "github.com/vito/cmdtest/matchers"

	. "github.com/pivotal-cf-experimental/cf-test-helpers/cf"
	. "github.com/pivotal-cf-experimental/cf-test-helpers/generator"
	"fmt"
	"time"
)

var _ = Describe("Riak CS Service", func() {
	BeforeEach(func() {
		AppName = RandomName()

		Expect(Cf("push", AppName, "-m", "256M", "-p", sinatraPath, "-no-start")).To(ExitWithTimeout(0, 60*time.Second))
	})

	AfterEach(func() {
		Expect(Cf("delete", AppName, "-f")).To(ExitWithTimeout(0, 20*time.Second))
	})

	It("Allows users to create, bind, write to, read from, unbind, and destroy the service instance", func() {
		ServiceName := "riak-cs"
		PlanName := "bucket"
		ServiceInstanceName := RandomName()

		Expect(Cf("create-service", ServiceName, PlanName, ServiceInstanceName)).To(ExitWithTimeout(0, 60*time.Second))
		Expect(Cf("bind-service", AppName, ServiceInstanceName)).To(ExitWithTimeout(0, 60*time.Second))
		Expect(Cf("start", AppName)).To(ExitWithTimeout(0, 120*time.Second))

		uri := AppUri(AppName) + "/service/blobstore/" + ServiceInstanceName + "/mykey"
		delete_uri := AppUri(AppName) + "/service/blobstore/" + ServiceInstanceName

		fmt.Println("Posting to url: ", uri)
		Eventually(Curling("-d", "myvalue", uri), 10.0, 1.0).Should(Say("myvalue"))
		fmt.Println("\n")

		fmt.Println("Curling url: ", uri)
		Eventually(Curling(uri), 10.0, 1.0).Should(Say("myvalue"))
		fmt.Println("\n")

		fmt.Println("Sending delete to: ", delete_uri)
		Eventually(Curling("-X", "DELETE", delete_uri), 10.0, 1.0).Should(Say(""))
		fmt.Println("\n")
<commit_msg>increase timeout for starting app in integration test<commit_after>package apps

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	. "github.com/vito/cmdtest/matchers"

	. "github.com/pivotal-cf-experimental/cf-test-helpers/cf"
	. "github.com/pivotal-cf-experimental/cf-test-helpers/generator"
	"fmt"
	"time"
)

var _ = Describe("Riak CS Service", func() {
	BeforeEach(func() {
		AppName = RandomName()

		Expect(Cf("push", AppName, "-m", "256M", "-p", sinatraPath, "-no-start")).To(ExitWithTimeout(0, 60*time.Second))
	})

	AfterEach(func() {
		Expect(Cf("delete", AppName, "-f")).To(ExitWithTimeout(0, 20*time.Second))
	})

	It("Allows users to create, bind, write to, read from, unbind, and destroy the service instance", func() {
		ServiceName := "riak-cs"
		PlanName := "bucket"
		ServiceInstanceName := RandomName()

		Expect(Cf("create-service", ServiceName, PlanName, ServiceInstanceName)).To(ExitWithTimeout(0, 60*time.Second))
		Expect(Cf("bind-service", AppName, ServiceInstanceName)).To(ExitWithTimeout(0, 60*time.Second))
		Expect(Cf("start", AppName)).To(ExitWithTimeout(0, 5*60*time.Second))

		uri := AppUri(AppName) + "/service/blobstore/" + ServiceInstanceName + "/mykey"
		delete_uri := AppUri(AppName) + "/service/blobstore/" + ServiceInstanceName

		fmt.Println("Posting to url: ", uri)
		Eventually(Curling("-d", "myvalue", uri), 10.0, 1.0).Should(Say("myvalue"))
		fmt.Println("\n")

		fmt.Println("Curling url: ", uri)
		Eventually(Curling(uri), 10.0, 1.0).Should(Say("myvalue"))
		fmt.Println("\n")

		fmt.Println("Sending delete to: ", delete_uri)
		Eventually(Curling("-X", "DELETE", delete_uri), 10.0, 1.0).Should(Say(""))
		fmt.Println("\n")

{'fraction_non_alphanumeric': 0.19411941194119411, 'fraction_numerical': 0.0204020402040204, 'mean_word_length': 5.106227106227106, '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': '6715834', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1218, 'n_words': 209}