Skip to content

Commit b2eaf2f

Browse files
committed
Fixed unlisted running dbs to missing db API
1 parent e485c0b commit b2eaf2f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

api-service/service/hosts.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,17 @@ func (as *APIService) DismissHost(hostname string) error {
479479
}
480480

481481
func (as *APIService) IsMissingDB(hostname string) ([]string, error) {
482-
return as.Database.FindUnretrievedDatabases(hostname)
482+
unlisted, err := as.Database.FindUnlistedRunningDatabases(hostname)
483+
if err != nil {
484+
return nil, err
485+
}
486+
487+
unretrieved, err := as.Database.FindUnretrievedDatabases(hostname)
488+
if err != nil {
489+
return nil, err
490+
}
491+
492+
return append(unlisted, unretrieved...), nil
483493
}
484494

485495
func checkHosts(as *APIService, hosts []string) error {

api-service/service/hosts_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ func TestGetHostDataSummaries(t *testing.T) {
713713

714714
if tc.res != nil {
715715
db.EXPECT().FindUnretrievedDatabases("pluto").Return(nil, nil).Times(1)
716+
db.EXPECT().FindUnlistedRunningDatabases("pluto").Return(nil, nil).Times(1)
716717
}
717718

718719
res, err := as.GetHostDataSummaries(tc.filters)

0 commit comments

Comments
 (0)