<commit_before>package hoverfly_end_to_end_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"os/exec"
	"strings"
	"strconv"
	"github.com/phayes/freeport"
	"fmt"
)

var _ = Describe("When I use hoverfly-cli", func() {
	var (
		hoverflyCmd *exec.Cmd

		adminPort = freeport.GetPort()
		adminPortAsString = strconv.Itoa(adminPort)

		proxyPort = freeport.GetPort()
		proxyPortAsString = strconv.Itoa(proxyPort)
	)

	Describe("with a running hoverfly", func() {

		BeforeEach(func() {
			hoverflyCmd = startHoverfly(adminPort, proxyPort, workingDirectory)
			WriteConfiguration("localhost", adminPortAsString, proxyPortAsString)
		})

		AfterEach(func() {
			hoverflyCmd.Process.Kill()
		})

		Context("I can get the response delay config set on hoverfly", func() {

			It("when no delay is set", func() {
				SetHoverflyMode("simulate", adminPort)

				out, _ := exec.Command(hoverctlBinary, "delays").Output()

				output := strings.TrimSpace(string(out))
				fmt.Println(output)
				// TODO: when no delays are set we should really have a nice message
				Expect(len(output)).To(Equal(0))
			})

		})

		Context("I can update the response delay config set on hoverfly", func() {

			It("when no delay is set", func() {
				SetHoverflyMode("simulate", adminPort)

				out, _ := exec.Command(hoverctlBinary, "delays", "testdata/delays.json").Output()

				output := strings.TrimSpace(string(out))
				fmt.Println(output)
				Expect(output).To(ContainSubstring("Response delays set in Hoverfly"))
				Expect(output).To(ContainSubstring("UrlPattern:host1"))
				Expect(output).To(ContainSubstring("Delay:110"))
				Expect(output).To(ContainSubstring("UrlPattern:host2"))
				Expect(output).To(ContainSubstring("Delay:100"))
			})

		})


<commit_msg>Removing some unwanted printing during the functional tests<commit_after>package hoverfly_end_to_end_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"os/exec"
	"strings"
	"strconv"
	"github.com/phayes/freeport"
)

var _ = Describe("When I use hoverfly-cli", func() {
	var (
		hoverflyCmd *exec.Cmd

		adminPort = freeport.GetPort()
		adminPortAsString = strconv.Itoa(adminPort)

		proxyPort = freeport.GetPort()
		proxyPortAsString = strconv.Itoa(proxyPort)
	)

	Describe("with a running hoverfly", func() {

		BeforeEach(func() {
			hoverflyCmd = startHoverfly(adminPort, proxyPort, workingDirectory)
			WriteConfiguration("localhost", adminPortAsString, proxyPortAsString)
		})

		AfterEach(func() {
			hoverflyCmd.Process.Kill()
		})

		Context("I can get the response delay config set on hoverfly", func() {

			It("when no delay is set", func() {
				SetHoverflyMode("simulate", adminPort)

				out, _ := exec.Command(hoverctlBinary, "delays").Output()

				output := strings.TrimSpace(string(out))
				// TODO: when no delays are set we should really have a nice message
				Expect(len(output)).To(Equal(0))
			})

		})

		Context("I can update the response delay config set on hoverfly", func() {

			It("when no delay is set", func() {
				SetHoverflyMode("simulate", adminPort)

				out, _ := exec.Command(hoverctlBinary, "delays", "testdata/delays.json").Output()

				output := strings.TrimSpace(string(out))
				Expect(output).To(ContainSubstring("Response delays set in Hoverfly"))
				Expect(output).To(ContainSubstring("UrlPattern:host1"))
				Expect(output).To(ContainSubstring("Delay:110"))
				Expect(output).To(ContainSubstring("UrlPattern:host2"))
				Expect(output).To(ContainSubstring("Delay:100"))
			})

		})



{'fraction_non_alphanumeric': 0.1394953218032322, 'fraction_numerical': 0.005103487383045081, 'mean_word_length': 4.4953271028037385, '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': '4662895', 'n_tokens_mistral': 1347, 'n_tokens_neox': 1166, 'n_words': 236}