From 69763c4289627c1198ca3a993a4adc9285485986 Mon Sep 17 00:00:00 2001 From: sam boyer Date: Wed, 24 Jan 2018 08:51:16 -0500 Subject: [PATCH] dep: Fix erroneous test use of non-project root --- manifest_test.go | 20 ++++++++++---------- testdata/manifest/golden.toml | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/manifest_test.go b/manifest_test.go index d344d710..cd22c383 100644 --- a/manifest_test.go +++ b/manifest_test.go @@ -32,7 +32,7 @@ func TestReadManifest(t *testing.T) { c, _ := gps.NewSemverConstraint("^0.12.0") want := Manifest{ Constraints: map[gps.ProjectRoot]gps.ProjectProperties{ - gps.ProjectRoot("github.com/golang/dep/gps"): { + gps.ProjectRoot("github.com/golang/dep"): { Constraint: c, }, gps.ProjectRoot("github.com/babble/brook"): { @@ -40,8 +40,8 @@ func TestReadManifest(t *testing.T) { }, }, Ovr: map[gps.ProjectRoot]gps.ProjectProperties{ - gps.ProjectRoot("github.com/golang/dep/gps"): { - Source: "https://github.com/golang/dep/gps", + gps.ProjectRoot("github.com/golang/dep"): { + Source: "https://github.com/golang/dep", Constraint: gps.NewBranch("master"), }, }, @@ -74,14 +74,14 @@ func TestWriteManifest(t *testing.T) { want := h.GetTestFileString(golden) c, _ := gps.NewSemverConstraint("^0.12.0") m := NewManifest() - m.Constraints[gps.ProjectRoot("github.com/golang/dep/gps")] = gps.ProjectProperties{ + m.Constraints[gps.ProjectRoot("github.com/golang/dep")] = gps.ProjectProperties{ Constraint: c, } m.Constraints[gps.ProjectRoot("github.com/babble/brook")] = gps.ProjectProperties{ Constraint: gps.Revision("d05d5aca9f895d19e9265839bffeadd74a2d2ecb"), } - m.Ovr[gps.ProjectRoot("github.com/golang/dep/gps")] = gps.ProjectProperties{ - Source: "https://github.com/golang/dep/gps", + m.Ovr[gps.ProjectRoot("github.com/golang/dep")] = gps.ProjectProperties{ + Source: "https://github.com/golang/dep", Constraint: gps.NewBranch("master"), } m.Ignored = []string{"github.com/foo/bar"} @@ -622,7 +622,7 @@ func TestFromRawPruneOptions(t *testing.T) { GoTests: true, Projects: []rawPruneProjectOptions{ { - Name: "github.com/golang/dep/gps", + Name: "github.com/golang/dep", UnusedPackages: false, NonGoFiles: false, GoTests: false, @@ -632,7 +632,7 @@ func TestFromRawPruneOptions(t *testing.T) { wantOptions: gps.RootPruneOptions{ PruneOptions: 15, ProjectOptions: gps.PruneProjectOptions{ - "github.com/golang/dep/gps": 1, + "github.com/golang/dep": 1, }, }, }, @@ -644,7 +644,7 @@ func TestFromRawPruneOptions(t *testing.T) { GoTests: false, Projects: []rawPruneProjectOptions{ { - Name: "github.com/golang/dep/gps", + Name: "github.com/golang/dep", UnusedPackages: true, NonGoFiles: true, GoTests: true, @@ -654,7 +654,7 @@ func TestFromRawPruneOptions(t *testing.T) { wantOptions: gps.RootPruneOptions{ PruneOptions: 1, ProjectOptions: gps.PruneProjectOptions{ - "github.com/golang/dep/gps": 15, + "github.com/golang/dep": 15, }, }, }, diff --git a/testdata/manifest/golden.toml b/testdata/manifest/golden.toml index 225952b5..2ba8dfa0 100644 --- a/testdata/manifest/golden.toml +++ b/testdata/manifest/golden.toml @@ -5,10 +5,10 @@ ignored = ["github.com/foo/bar"] revision = "d05d5aca9f895d19e9265839bffeadd74a2d2ecb" [[constraint]] - name = "github.com/golang/dep/gps" + name = "github.com/golang/dep" version = "0.12.0" [[override]] branch = "master" - name = "github.com/golang/dep/gps" - source = "https://github.com/golang/dep/gps" + name = "github.com/golang/dep" + source = "https://github.com/golang/dep"