Skip to content

Commit

Permalink
fix jobstore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
udsamani committed Sep 11, 2024
1 parent 4de9f18 commit 6b8d0b3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/jobstore/boltdb/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
"github.com/stretchr/testify/suite"
"k8s.io/apimachinery/pkg/labels"

"github.com/bacalhau-project/bacalhau/pkg/bacerrors"
"github.com/bacalhau-project/bacalhau/pkg/jobstore"
"github.com/bacalhau-project/bacalhau/pkg/models"
"github.com/bacalhau-project/bacalhau/pkg/test/mock"
Expand Down Expand Up @@ -202,7 +201,7 @@ func (s *BoltJobstoreTestSuite) TestUnfilteredJobHistory() {

jobHistoryQueryResponse, err = s.store.GetJobHistory(s.ctx, "1", jobstore.JobHistoryQuery{})
s.Require().Error(err)
s.Require().IsType(err, &bacerrors.MultipleJobsFound{})
s.Require().IsType(err, &models.BaseError{})
s.Require().Nil(jobHistoryQueryResponse)
}

Expand Down Expand Up @@ -543,7 +542,7 @@ func (s *BoltJobstoreTestSuite) TestGetExecutions() {
JobID: "100",
})
s.Require().Error(err)
s.Require().IsType(err, &bacerrors.JobNotFound{})
s.Require().IsType(err, &models.BaseError{})
s.Require().Nil(state)

state, err = s.store.GetExecutions(s.ctx, jobstore.GetExecutionsOptions{
Expand All @@ -557,7 +556,7 @@ func (s *BoltJobstoreTestSuite) TestGetExecutions() {
JobID: "1",
})
s.Require().Error(err)
s.Require().IsType(err, &bacerrors.MultipleJobsFound{})
s.Require().IsType(err, &models.BaseError{})
s.Require().Nil(state)

// Created At Ascending Order Sort
Expand Down Expand Up @@ -684,7 +683,7 @@ func (s *BoltJobstoreTestSuite) TestShortIDs() {
// No matches
_, err := s.store.GetJob(s.ctx, shortString)
s.Require().Error(err)
s.Require().IsType(err, &bacerrors.JobNotFound{})
s.Require().IsType(err, &models.BaseError{})

// Create and fetch the single entry
err = s.store.CreateJob(s.ctx, *job)
Expand All @@ -701,7 +700,7 @@ func (s *BoltJobstoreTestSuite) TestShortIDs() {

_, err = s.store.GetJob(s.ctx, shortString)
s.Require().Error(err)
s.Require().IsType(err, &bacerrors.MultipleJobsFound{})
s.Require().IsType(err, &models.BaseError{})
}

func (s *BoltJobstoreTestSuite) TestEvents() {
Expand Down

0 comments on commit 6b8d0b3

Please sign in to comment.