From d9cf4fdba29d4d1e2d16dc683b563a75a1e84622 Mon Sep 17 00:00:00 2001 From: Carolyn Van Slyck Date: Fri, 1 Sep 2017 18:00:22 -0500 Subject: [PATCH] Add test for #939 --- cmd/dep/base_importer_test.go | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/cmd/dep/base_importer_test.go b/cmd/dep/base_importer_test.go index cd1794ebde..3282c6ee67 100644 --- a/cmd/dep/base_importer_test.go +++ b/cmd/dep/base_importer_test.go @@ -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" @@ -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", @@ -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 {