fix unit tests

This commit is contained in:
André Roth
2024-06-17 13:50:49 +02:00
parent 174bdc2b5e
commit 2a07494910
2 changed files with 6 additions and 0 deletions

View File

@@ -48,6 +48,9 @@ func (repo *LocalRepo) String() string {
// NumPackages return number of packages in local repo
func (repo *LocalRepo) NumPackages() int {
if repo.packageRefs == nil {
return 0
}
return repo.packageRefs.Len()
}

View File

@@ -163,6 +163,9 @@ func (repo *RemoteRepo) IsFlat() bool {
// NumPackages return number of packages retrieved from remote repo
func (repo *RemoteRepo) NumPackages() int {
if repo.packageRefs == nil {
return 0
}
return repo.packageRefs.Len()
}