<commit_before>package ccbridge_test

import (
	"archive/tar"
	"bytes"
	"compress/gzip"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"time"

	"github.com/cloudfoundry-incubator/bbs/db/etcd"
	"github.com/cloudfoundry-incubator/candiedyaml"
	"github.com/cloudfoundry-incubator/inigo/fake_cc"
	"github.com/cloudfoundry-incubator/inigo/helpers"
	"github.com/cloudfoundry-incubator/inigo/world"
	"github.com/cloudfoundry/gunk/urljoiner"
	"github.com/tedsuo/ifrit"
	"github.com/tedsuo/ifrit/ginkgomon"
	"github.com/tedsuo/ifrit/grouper"

	"github.com/cloudfoundry-incubator/runtime-schema/cc_messages"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	zip_helper "github.com/pivotal-golang/archiver/extractor/test_helper"
)

const (
	buildpack_zip        = "buildpack.zip"
	busted_buildpack_zip = "busted_buildpack.zip"

	staging_source = "STG"
)

var _ = Describe("Stager", func() {
	var appId string
	var taskId string

	var fileServerStaticDir string

	var (
		cell   ifrit.Process
		brain  ifrit.Process
		bridge ifrit.Process
	)

	var fakeCC *fake_cc.FakeCC

	var buildArtifactsUploadUri string
	var dropletUploadUri string

	var adminBuildpackFiles = []zip_helper.ArchiveFile{
		{
			Name: "bin/detect",
			Body: `#!/bin/sh
echo My Buildpack
				`},
		{
			Name: "bin/compile",
			Body: `#!/bin/sh
echo $1 $2
echo COMPILING BUILDPACK
echo $SOME_STAGING_ENV
touch $1/compiled
touch $2/inserted-into-artifacts-cache
				`},
		{
			Name: "bin/release",<commit_msg>lost commit for buildpack errors story [#101379904]<commit_after>package ccbridge_test

import (
	"archive/tar"
	"bytes"
	"compress/gzip"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"time"

	"github.com/cloudfoundry-incubator/bbs/db/etcd"
	"github.com/cloudfoundry-incubator/candiedyaml"
	"github.com/cloudfoundry-incubator/inigo/fake_cc"
	"github.com/cloudfoundry-incubator/inigo/helpers"
	"github.com/cloudfoundry-incubator/inigo/world"
	"github.com/cloudfoundry/gunk/urljoiner"
	"github.com/tedsuo/ifrit"
	"github.com/tedsuo/ifrit/ginkgomon"
	"github.com/tedsuo/ifrit/grouper"

	"github.com/cloudfoundry-incubator/runtime-schema/cc_messages"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	zip_helper "github.com/pivotal-golang/archiver/extractor/test_helper"
)

const (
	buildpack_zip        = "buildpack.zip"
	busted_buildpack_zip = "busted_buildpack.zip"

	staging_source = "STG"
)

var _ = Describe("Stager", func() {
	var appId string
	var taskId string

	var fileServerStaticDir string

	var (
		cell   ifrit.Process
		brain  ifrit.Process
		bridge ifrit.Process
	)

	var fakeCC *fake_cc.FakeCC

	var buildArtifactsUploadUri string
	var dropletUploadUri string
	var bustedAdminBuildpackFiles []zip_helper.ArchiveFile

	var adminBuildpackFiles = []zip_helper.ArchiveFile{
		{
			Name: "bin/detect",
			Body: `#!/bin/sh
echo My Buildpack
				`},
		{
			Name: "bin/compile",
			Body: `#!/bin/sh
echo $1 $2
echo COMPILING BUILDPACK
echo $SOME_STAGING_ENV
touch $1/compiled
touch $2/inserted-into-artifacts-cache
				`},
		{
			Name: "bin/release",
{'fraction_non_alphanumeric': 0.13211125158027812, 'fraction_numerical': 0.005372945638432364, 'mean_word_length': 4.2574750830564785, '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': '1036888', 'n_tokens_mistral': 1378, 'n_tokens_neox': 1297, 'n_words': 196}