From 1853dc3bb14d9bca10db215ade180fdb6897ec37 Mon Sep 17 00:00:00 2001 From: Vytautas Saltenis Date: Sun, 10 Sep 2017 11:51:37 +0300 Subject: [PATCH] Fix NonCanonicalImportRoot test --- internal/gps/pkgtree/pkgtree_test.go | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/internal/gps/pkgtree/pkgtree_test.go b/internal/gps/pkgtree/pkgtree_test.go index 79a2a50f79..03c62e438b 100644 --- a/internal/gps/pkgtree/pkgtree_test.go +++ b/internal/gps/pkgtree/pkgtree_test.go @@ -1332,10 +1332,22 @@ func TestListPackages(t *testing.T) { "non-canonical": { fileRoot: j("canonical"), importRoot: "noncanonical", - out: PackageTree{}, - err: &NonCanonicalImportRoot{ + out: PackageTree{ ImportRoot: "noncanonical", - Canonical: "canonical", + Packages: map[string]PackageOrErr{ + "noncanonical": PackageOrErr{ + Err: &NonCanonicalImportRoot{ + ImportRoot: "noncanonical", + Canonical: "canonical", + }, + }, + "noncanonical/sub": PackageOrErr{ + Err: &NonCanonicalImportRoot{ + ImportRoot: "noncanonical", + Canonical: "canonical/subpackage", + }, + }, + }, }, }, }