Skip to content

Commit

Permalink
makes DependencyMapper packit-internal
Browse files Browse the repository at this point in the history
Signed-off-by: Forest Eckhardt <feckhardt@pivotal.io>
  • Loading branch information
Frankie Gallina-Jones authored and ForestEckhardt committed Feb 24, 2021
1 parent 59e947f commit 7900ecf
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
1 change: 0 additions & 1 deletion postal/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
func TestUnitPostal(t *testing.T) {
suite := spec.New("packit/postal", spec.Report(report.Terminal{}))
suite("Service", testService)
suite("DependencyMappings", testDependencyMappings)

suite.Run(t)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package postal
package internal

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package postal_test
package internal_test

import (
"io/ioutil"
"os"
"path/filepath"
"testing"

"github.com/paketo-buildpacks/packit/postal"
"github.com/paketo-buildpacks/packit/postal/internal"
"github.com/sclevine/spec"

. "github.com/onsi/gomega"
Expand All @@ -16,13 +16,13 @@ func testDependencyMappings(t *testing.T, context spec.G, it spec.S) {
var (
Expect = NewWithT(t).Expect
path string
resolver postal.DependencyMappingResolver
resolver internal.DependencyMappingResolver
bindingPath string
err error
)

it.Before(func() {
resolver = postal.NewDependencyMappingResolver()
resolver = internal.NewDependencyMappingResolver()
bindingPath, err = ioutil.TempDir("", "bindings")
Expect(err).NotTo(HaveOccurred())
})
Expand Down
15 changes: 15 additions & 0 deletions postal/internal/init_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package internal_test

import (
"testing"

"github.com/sclevine/spec"
"github.com/sclevine/spec/report"
)

func TestUnitPostalInternal(t *testing.T) {
suite := spec.New("packit/postal/internal", spec.Report(report.Terminal{}))
suite("DependencyMappings", testDependencyMappings)

suite.Run(t)
}
3 changes: 2 additions & 1 deletion postal/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/Masterminds/semver/v3"
"github.com/paketo-buildpacks/packit/cargo"
"github.com/paketo-buildpacks/packit/postal/internal"
"github.com/paketo-buildpacks/packit/vacation"
)

Expand Down Expand Up @@ -38,7 +39,7 @@ type Service struct {
func NewService(transport Transport) Service {
return Service{
transport: transport,
mappingResolver: NewDependencyMappingResolver(),
mappingResolver: internal.NewDependencyMappingResolver(),
}
}

Expand Down

0 comments on commit 7900ecf

Please sign in to comment.