mirror of
https://github.com/rancher/steve.git
synced 2025-09-11 12:19:53 +00:00
Move types related to list options and sql queries into their own package. (#610)
The problem having these in the informer package is that eventually code in other packages will need to import `informer` only for constants or types, but some members of the informer package may already depend on those. Best to move type definitions into their own simpler package.
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/rancher/steve/pkg/sqlcache/db"
|
||||
"github.com/rancher/steve/pkg/sqlcache/partition"
|
||||
"github.com/rancher/steve/pkg/sqlcache/sqltypes"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/mock/gomock"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@@ -313,7 +314,7 @@ func TestInformerListByOptions(t *testing.T) {
|
||||
informer := &Informer{
|
||||
ByOptionsLister: indexer,
|
||||
}
|
||||
lo := ListOptions{}
|
||||
lo := sqltypes.ListOptions{}
|
||||
var partitions []partition.Partition
|
||||
ns := "somens"
|
||||
expectedList := &unstructured.UnstructuredList{
|
||||
@@ -336,7 +337,7 @@ func TestInformerListByOptions(t *testing.T) {
|
||||
informer := &Informer{
|
||||
ByOptionsLister: indexer,
|
||||
}
|
||||
lo := ListOptions{}
|
||||
lo := sqltypes.ListOptions{}
|
||||
var partitions []partition.Partition
|
||||
ns := "somens"
|
||||
indexer.EXPECT().ListByOptions(context.Background(), lo, partitions, ns).Return(nil, 0, "", fmt.Errorf("error"))
|
||||
|
Reference in New Issue
Block a user