- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for GetMockCollection (0.13 sec)
-
pkg/kube/krt/krttest/helpers.go
} // NewMock creates a helper to build Collections of static inputs for use with testing. // Example usage: // // mock := krttest.NewMock(t, []any{serviceFoo, podBar, namespaceBaz}) // pods := krttest.GetMockCollection[Pod](mock) // makes a collection of all Pod types from inputs func NewMock(t test.Failer, inputs []any) *MockCollection { t.Helper() mc := &MockCollection{t: t, inputs: inputs} t.Cleanup(func() { t.Helper()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 21 19:33:01 UTC 2024 - 2.1K bytes - Viewed (0) -
pilot/pkg/serviceregistry/kube/controller/ambient/services_test.go
for _, tt := range cases { t.Run(tt.name, func(t *testing.T) { mock := krttest.NewMock(t, tt.inputs) a := newAmbientUnitTest() builder := a.serviceEntryServiceBuilder( krttest.GetMockCollection[Waypoint](mock), krttest.GetMockCollection[*v1.Namespace](mock), ) wrapper := builder(krt.TestingDummyContext{}, tt.se) res := slices.Map(wrapper, func(e model.ServiceInfo) *workloadapi.Service { return e.Service })
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 05 12:29:55 UTC 2024 - 2.9K bytes - Viewed (0)