<commit_before>package hoverfly_end_to_end_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"fmt"
	"net/http"
	"time"
	"path/filepath"
	"os/exec"
	"os"
	"strings"
	"strconv"
	"github.com/phayes/freeport"
)

const (
	simulate = "simulate"
	capture = "capture"
	synthesize = "synthesize"
	modify = "modify"
)

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

		workingDir, _ = os.Getwd()
		adminPort = freeport.GetPort()
		adminPortAsString = strconv.Itoa(adminPort)
	)

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

		BeforeEach(func() {
			hoverflyBinaryUri := filepath.Join(workingDir, "bin/hoverfly")
			hoverflyCmd = exec.Command(hoverflyBinaryUri, "-db", "memory", "-ap", adminPortAsString, "-pp", "8500")


			err := hoverflyCmd.Start()

			if err != nil {
				fmt.Println("Unable to start Hoverfly")
				fmt.Println(hoverflyBinaryUri)
				fmt.Println("Is the binary there?")
				os.Exit(1)
			}

			Eventually(func() int {<commit_msg>Randomising the proxy port also in functional tests<commit_after>package hoverfly_end_to_end_test

import (
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"fmt"
	"net/http"
	"time"
	"path/filepath"
	"os/exec"
	"os"
	"strings"
	"strconv"
	"github.com/phayes/freeport"
)

const (
	simulate = "simulate"
	capture = "capture"
	synthesize = "synthesize"
	modify = "modify"
)

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

		workingDir, _ = os.Getwd()
		adminPort = freeport.GetPort()
		adminPortAsString = strconv.Itoa(adminPort)

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

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

		BeforeEach(func() {
			hoverflyBinaryUri := filepath.Join(workingDir, "bin/hoverfly")
			hoverflyCmd = exec.Command(hoverflyBinaryUri, "-db", "memory", "-ap", adminPortAsString, "-pp", proxyPortAsString)


			err := hoverflyCmd.Start()

			if err != nil {
				fmt.Println("Unable to start Hoverfly")
				fmt.Println(hoverflyBinaryUri)
				fmt.Println("Is the binary there?")
				os.Exit(1)
			}

			Eventually(func() int {
{'fraction_non_alphanumeric': 0.1474870831376233, 'fraction_numerical': 0.0028182245185533112, 'mean_word_length': 4.035460992907802, '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': '2096125', 'n_tokens_mistral': 891, 'n_tokens_neox': 814, 'n_words': 155}