- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for GetMockCollection (0.16 sec)
-
pilot/pkg/serviceregistry/kube/controller/ambient/workloads_test.go
WorkloadServices := krttest.GetMockCollection[model.ServiceInfo](mock) WorkloadServicesNamespaceIndex := krt.NewNamespaceIndex(WorkloadServices) builder := a.podWorkloadBuilder( GetMeshConfig(mock), krttest.GetMockCollection[model.WorkloadAuthorization](mock), krttest.GetMockCollection[*securityclient.PeerAuthentication](mock), krttest.GetMockCollection[Waypoint](mock), WorkloadServices,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 16:51:29 UTC 2024 - 20.3K bytes - Viewed (0) -
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)