Skip to content

Commit

Permalink
db_getter_test.go: test fix for missing log data in jobservice DB log…
Browse files Browse the repository at this point in the history
…ging
  • Loading branch information
mohamedawnallah committed Jul 2, 2024
1 parent 42931f4 commit 276609c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/jobservice/logger/getter/db_getter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/jobservice/config"
"github.com/goharbor/harbor/src/jobservice/logger/backend"
"github.com/goharbor/harbor/src/jobservice/logger/sweeper"
"github.com/goharbor/harbor/src/lib/log"
Expand Down Expand Up @@ -44,9 +45,11 @@ func TestDBGetter(t *testing.T) {
err = l.Close()
require.NoError(t, err)

_ = config.DefaultConfig.Load("../../config_test.yml", true)
dbGetter := NewDBGetter()
ll, err := dbGetter.Retrieve(uuid)
require.Nil(t, err)
require.NotEqual(t, 0, len(ll))
log.Infof("get logger %s", ll)

err = sweeper.PrepareDBSweep()
Expand Down

0 comments on commit 276609c

Please # to comment.