<commit_before>package routes_test

import (
	"bytes"
	"io"
	"log"
	"math"
	"net/http"
	"net/http/httptest"
	"os"
	"reflect"
	"strings"
	"testing"

	"archive/zip"

	"io/ioutil"

	"github.com/cloudfoundry-incubator/bits-service"
	"github.com/cloudfoundry-incubator/bits-service/blobstores/decorator"
	"github.com/cloudfoundry-incubator/bits-service/blobstores/inmemory"
	"github.com/cloudfoundry-incubator/bits-service/httputil"
	. "github.com/cloudfoundry-incubator/bits-service/routes"
	"github.com/cloudfoundry-incubator/bits-service/statsd"
	. "github.com/cloudfoundry-incubator/bits-service/testutil"
	"github.com/gorilla/mux"
	"github.com/onsi/ginkgo"
	"github.com/onsi/gomega"
	"github.com/petergtz/pegomock"
	. "github.com/petergtz/pegomock"
)

func TestRoutes(t *testing.T) {
	gomega.RegisterFailHandler(ginkgo.Fail)
	pegomock.RegisterMockFailHandler(ginkgo.Fail)
	ginkgo.RunSpecs(t, "Routes")
}

// TODO this test does more than just routes. Maybe it should be moved to the cmd package instead.
var _ = Describe("routes", func() {
	BeforeSuite(func() {
		log.SetFlags(log.LstdFlags | log.Lshortfile | log.LUTC)
	})

	var (
		blobstoreEntries  map[string][]byte
		blobstore         *inmemory_blobstore.Blobstore
		appstashBlobstore *inmemory_blobstore.Blobstore<commit_msg>Add missing aliases for imports<commit_after>package routes_test

import (
	"bytes"
	"io"
	"log"
	"math"
	"net/http"
	"net/http/httptest"
	"os"
	"reflect"
	"strings"
	"testing"

	"archive/zip"

	"io/ioutil"

	bitsgo "github.com/cloudfoundry-incubator/bits-service"
	"github.com/cloudfoundry-incubator/bits-service/blobstores/decorator"
	inmemory_blobstore "github.com/cloudfoundry-incubator/bits-service/blobstores/inmemory"
	"github.com/cloudfoundry-incubator/bits-service/httputil"
	. "github.com/cloudfoundry-incubator/bits-service/routes"
	"github.com/cloudfoundry-incubator/bits-service/statsd"
	. "github.com/cloudfoundry-incubator/bits-service/testutil"
	"github.com/gorilla/mux"
	"github.com/onsi/ginkgo"
	"github.com/onsi/gomega"
	"github.com/petergtz/pegomock"
	. "github.com/petergtz/pegomock"
)

func TestRoutes(t *testing.T) {
	gomega.RegisterFailHandler(ginkgo.Fail)
	pegomock.RegisterMockFailHandler(ginkgo.Fail)
	ginkgo.RunSpecs(t, "Routes")
}

// TODO this test does more than just routes. Maybe it should be moved to the cmd package instead.
var _ = Describe("routes", func() {
	BeforeSuite(func() {
		log.SetFlags(log.LstdFlags | log.Lshortfile | log.LUTC)
	})

	var (
		blobstoreEntries  map[string][]byte
		blobstore         *inmemory_blobstore.Blobstore
		appstashBlobstore *inmemory_blobstore.Blobstore
{'fraction_non_alphanumeric': 0.1335379892555641, 'fraction_numerical': 0.0, 'mean_word_length': 4.91156462585034, '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': '3720754', 'n_tokens_mistral': 1037, 'n_tokens_neox': 1022, 'n_words': 137}