Skip to content

Commit

Permalink
Move the FakeSummaryCache out of virtual/common into its own package.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpromislow committed Oct 18, 2024
1 parent a9de94a commit 261800d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common
package testutil

import (
"github.com/rancher/steve/pkg/summarycache"
Expand Down
7 changes: 4 additions & 3 deletions pkg/resources/virtual/virtual_test.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package virtual_test

import (
"github.com/rancher/steve/pkg/resources/virtual"
"k8s.io/apimachinery/pkg/runtime/schema"
"strings"
"testing"

"github.com/rancher/steve/pkg/resources/virtual"
"github.com/rancher/steve/pkg/resources/virtual/common"
"github.com/rancher/steve/pkg/resources/virtual/testutil"
"github.com/rancher/steve/pkg/summarycache"
"github.com/rancher/wrangler/v3/pkg/summary"
"github.com/stretchr/testify/require"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
)

func TestTransformChain(t *testing.T) {
Expand Down Expand Up @@ -179,7 +180,7 @@ func TestTransformChain(t *testing.T) {
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
fakeCache := common.FakeSummaryCache{
fakeCache := testutil.FakeSummaryCache{
SummarizedObject: test.hasSummary,
Relationships: test.hasRelationships,
}
Expand Down

0 comments on commit 261800d

Please sign in to comment.