@@ -119,8 +119,8 @@ func TestBoltCacheTimeout(t *testing.T) {
119119 }
120120 comparePackageTree (t , ptree , got )
121121
122- gotV := c .getAllVersions ()
123- if len (gotV ) != len (pvs ) {
122+ gotV , ok := c .getAllVersions ()
123+ if ! ok || len (gotV ) != len (pvs ) {
124124 t .Errorf ("unexpected versions:\n \t (GOT): %#v\n \t (WNT): %#v" , gotV , pvs )
125125 } else {
126126 SortPairedForDowngrade (gotV )
@@ -161,8 +161,8 @@ func TestBoltCacheTimeout(t *testing.T) {
161161 }
162162 comparePackageTree (t , ptree , gotPtree )
163163
164- pvs := c .getAllVersions ()
165- if len (pvs ) > 0 {
164+ pvs , ok := c .getAllVersions ()
165+ if ok || len (pvs ) > 0 {
166166 t .Errorf ("expected no cached versions, but got:\n \t %#v" , pvs )
167167 }
168168 }
@@ -194,8 +194,8 @@ func TestBoltCacheTimeout(t *testing.T) {
194194 }
195195 comparePackageTree (t , ptree , got )
196196
197- gotV := c .getAllVersions ()
198- if len (gotV ) != len (pvs ) {
197+ gotV , ok := c .getAllVersions ()
198+ if ! ok || len (gotV ) != len (pvs ) {
199199 t .Errorf ("unexpected versions:\n \t (GOT): %#v\n \t (WNT): %#v" , gotV , pvs )
200200 } else {
201201 SortPairedForDowngrade (gotV )
@@ -282,8 +282,8 @@ func TestBoltCacheTimeout(t *testing.T) {
282282 }
283283 comparePackageTree (t , newPtree , got )
284284
285- gotV := c .getAllVersions ()
286- if len (gotV ) != len (newPVS ) {
285+ gotV , ok := c .getAllVersions ()
286+ if ! ok || len (gotV ) != len (newPVS ) {
287287 t .Errorf ("unexpected versions:\n \t (GOT): %#v\n \t (WNT): %#v" , gotV , newPVS )
288288 } else {
289289 SortPairedForDowngrade (gotV )
0 commit comments