Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
Add test for #939
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynvs committed Sep 1, 2017
1 parent 9abf952 commit d9cf4fd
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions cmd/dep/base_importer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import (
const (
importerTestProject = "github.com/carolynvs/deptest-importers"
importerTestProjectSrc = "https://github.com/carolynvs/deptest-importers.git"
importerTestUntaggedRev = "dbb4d971f45d414b34a230426d90e30ba7a92dcc"
importerTestUntaggedRev = "9b670d143bfb4a00f7461451d5c4a62f80e9d11d"
importerTestUntaggedRevAbbrv = "v1.0.0-1-g9b670d1"
importerTestBeta1Tag = "beta1"
importerTestBeta1Rev = "7913ab26988c6fb1e16225f845a178e8849dd254"
importerTestV2Branch = "v2"
Expand Down Expand Up @@ -323,6 +324,19 @@ func TestBaseImporter_ImportProjects(t *testing.T) {
},
},
},
"git describe constraint is ignored": {
convertTestCase{
wantConstraint: "*",
wantRevision: importerTestUntaggedRev,
},
[]importedPackage{
{
Name: importerTestProject,
LockHint: importerTestUntaggedRev,
ConstraintHint: importerTestUntaggedRevAbbrv,
},
},
},
"consolidate subpackages under root": {
convertTestCase{
wantConstraint: "master",
Expand Down Expand Up @@ -356,11 +370,6 @@ func TestBaseImporter_ImportProjects(t *testing.T) {
},
},
},

// TODO: classify v1.12.0-gabc123 testcase
// TODO: unhelpful constraints like "HEAD"
// TODO: unhelpful locks like a revision that doesn't exist
// * Versions that don't satisfy the constraint, drop the constraint.
}

for name, tc := range testcases {
Expand Down

0 comments on commit d9cf4fd

Please sign in to comment.