Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 10 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"stack": "cflinuxfs3",
"stack": "cflinuxfs4",
"oses": [
"linux",
"windows"
],
"integration": {
"harness": "ginkgo",
"harness": "switchblade",
"matrix": [
{ "cached": false, "parallel": true },
{ "cached": true, "parallel": true }
{
"cached": false,
"parallel": true
},
{
"cached": true,
"parallel": true
}
]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions fixtures/windows_app/loop.bat

This file was deleted.

3 changes: 0 additions & 3 deletions fixtures/windows_app/manifest.yml

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/windows_app/sym-loop.bat

This file was deleted.

1 change: 0 additions & 1 deletion fixtures/windows_app/sym-random-dir

This file was deleted.

17 changes: 17 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,44 @@ module github.com/cloudfoundry/binary-buildpack

require (
github.com/cloudfoundry/libbuildpack v0.0.0-20240717165421-f2ae8069fcba
github.com/cloudfoundry/switchblade v0.8.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.36.2
github.com/sclevine/spec v1.4.0
)

require (
code.cloudfoundry.org/lager v2.0.0+incompatible // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/docker/distribution v2.8.1+incompatible // indirect
github.com/docker/docker v24.0.9+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/elazarl/goproxy v1.2.8 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/paketo-buildpacks/packit v1.3.1 // indirect
github.com/paketo-buildpacks/packit/v2 v2.16.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/teris-io/shortid v0.0.0-20220617161101-71ec9f2aa569 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.28.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
3,050 changes: 3,047 additions & 3 deletions go.sum

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions src/binary/integration/default_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package integration_test

import (
"os/exec"
"path/filepath"
"testing"

"github.com/cloudfoundry/switchblade"
"github.com/sclevine/spec"

. "github.com/cloudfoundry/switchblade/matchers"
. "github.com/onsi/gomega"
)

func testDefault(platform switchblade.Platform, fixtures string) func(*testing.T, spec.G, spec.S) {
return func(t *testing.T, context spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect
Eventually = NewWithT(t).Eventually

name string
)

it.Before(func() {
var err error
name, err = switchblade.RandomName()
Expect(err).NotTo(HaveOccurred())
})

it.After(func() {
Expect(platform.Delete.Execute(name)).To(Succeed())
})

it("builds and runs the app when buildpack is specified", func() {
deployment, _, err := platform.Deploy.
WithBuildpacks("binary_buildpack").
Execute(name, filepath.Join(fixtures, "default"))
Expect(err).NotTo(HaveOccurred())

Eventually(deployment).Should(Serve(ContainSubstring("Hello, world!")))
})

context("the buildpack is not specified", func() {
it("it fails to run", func() {
_, logs, err := platform.Deploy.
Execute(name, filepath.Join(fixtures, "default"))
Expect(err).To(HaveOccurred())

Expect(logs).To(ContainSubstring("None of the buildpacks detected a compatible application"))
})
})

context("there is no start command given", func() {
it("it fails to run", func() {
deployment, _, err := platform.Deploy.
WithBuildpacks("binary_buildpack").
Execute(name, filepath.Join(fixtures, "no_start_command"))
Expect(err).NotTo(HaveOccurred())

cmd := exec.Command("docker", "container", "logs", deployment.Name)

output, err := cmd.CombinedOutput()
Expect(err).NotTo(HaveOccurred())

Expect(output).To(ContainSubstring("Error: no start command specified during staging or launch"), string(output))
})
})
}
}
54 changes: 0 additions & 54 deletions src/binary/integration/deploy_a_binary_app_test.go

This file was deleted.

68 changes: 0 additions & 68 deletions src/binary/integration/deploy_a_binary_windows_app_test.go

This file was deleted.

51 changes: 0 additions & 51 deletions src/binary/integration/deploy_an_app_with_no_start_command_test.go

This file was deleted.

45 changes: 0 additions & 45 deletions src/binary/integration/deploy_an_hwc_app_test.go

This file was deleted.

Loading
Loading