Skip to content

Commit

Permalink
Added test for GetOrphanTasks
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobht committed May 23, 2024
1 parent 9363cfe commit 359cb46
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions common/persistence/nosql/nosql_task_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ func setupNoSQLStoreMocks(t *testing.T) (*nosqlTaskStore, *nosqlplugin.MockDB) {
return store, dbMock
}

func TestGetOrphanTasks(t *testing.T) {
store, _ := setupNoSQLStoreMocks(t)

// We just expect the function to return an error so we don't need to check the result
_, err := store.GetOrphanTasks(ctx.Background(), nil)

var expectedErr *types.InternalServiceError
assert.ErrorAs(t, err, &expectedErr)
assert.ErrorContains(t, err, "Unimplemented call to GetOrphanTasks for NoSQL")
}

func TestGetTaskListSize(t *testing.T) {
store, db := setupNoSQLStoreMocks(t)

Expand Down

0 comments on commit 359cb46

Please sign in to comment.