- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 37 for fakeFs (0.19 sec)
-
cni/pkg/nodeagent/podcgroupns_test.go
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "istio.io/istio/pkg/test/util/assert" ) func TestWithProcFs(t *testing.T) { n := NewPodNetnsProcFinder(fakeFs()) pod := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{ Name: "foo", Namespace: "bar", UID: types.UID("863b91d4-4b68-4efa-917f-4b560e3e86aa"), }}
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 4.6K bytes - Viewed (0) -
cni/pkg/nodeagent/net_test.go
}, Spec: corev1.PodSpec{ServiceAccountName: "sa"}, } // this is usually called after add. so manually add the pod uid for now fakens := newFakeNs(123) closed := fakens.closed workload := WorkloadInfo{ Workload: podToWorkload(pod), Netns: fakens, } fixture.podNsMap.UpsertPodCacheWithNetns(string(pod.UID), workload) err := netServer.RemovePodFromMesh(ctx, pod) assert.NoError(t, err)
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 30 22:24:38 GMT 2024 - 16.4K bytes - Viewed (0) -
cni/pkg/nodeagent/fakes_test.go
return nil } // fakeNs is a mock struct for testing type fakeNs struct { closed *atomic.Bool fd uintptr inode uint64 } func newFakeNs(fd uintptr) *fakeNs { // the fake inode is the fd! magic. return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)} } func newFakeNsInode(fd uintptr, inode uint64) *fakeNs { return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode} }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 12 21:47:31 GMT 2024 - 3.9K bytes - Viewed (0) -
cni/pkg/nodeagent/server_test.go
server := &fakeServer{} server.Start(fakeCtx) server.On("DelPodFromMesh", fakeCtx, pod, ).Return(errors.New("fake error")) fakeClientSet := fake.NewSimpleClientset() m := meshDataplane{ kubeClient: fakeClientSet, netServer: server, } // pod is not in fake client, so if this will try to remove annotation, it will fail. err := m.DelPodFromMesh(fakeCtx, pod) assert.Error(t, err) }
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 7.8K bytes - Viewed (0) -
operator/cmd/mesh/manifest_shared_test.go
istioNamespace: constants.IstioSystemNamespace, watchedNamespaces: constants.IstioSystemNamespace, operatorNamespace: operatorDefaultNamespace, // placeholders, since the fake API server does not actually pull images and create pods. hub: "fake hub", tag: "fake tag", } _, mstr, err := renderOperatorManifest(nil, ocArgs) if err != nil { return err } if err := applyWithReconciler(reconciler, mstr); err != nil {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Feb 20 22:39:28 GMT 2024 - 11.7K bytes - Viewed (1) -
istioctl/pkg/waypoint/waypoint_test.go
makeGateway(constants.DefaultNamespaceWaypoint, "fake", true, true), }, expectedOutFile: "default-gateway", }, { name: "all namespaces gateways", args: strings.Split("list -A", " "), gateways: []*gateway.Gateway{ makeGateway(constants.DefaultNamespaceWaypoint, "default", true, true), makeGateway(constants.DefaultNamespaceWaypoint, "fake", true, true), }, expectedOutFile: "all-gateway", },
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Thu Apr 04 15:53:09 GMT 2024 - 4.4K bytes - Viewed (0) -
istioctl/pkg/util/handlers/handlers_test.go
ns := scheme.Codecs.WithoutConversion() codec := scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...) factory.Client = &fake.RESTClient{ GroupVersion: schema.GroupVersion{Group: "", Version: "v1"}, NegotiatedSerializer: ns, Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { switch p, m := req.URL.Path, req.Method; {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Jun 09 18:17:49 GMT 2023 - 6.6K bytes - Viewed (0) -
cni/pkg/log/uds_test.go
log.Info("info log") log.Warn("warn log") log.Error("error log") // This will error because stdout cannot sync, but the UDS part should sync // Ideally we would fail if the UDS part fails but the error library makes it kind of tricky _ = log.Sync() // Restore os stdout. os.Stdout = stdout assert.NoError(t, log.Configure(loggingOptions)) assert.NoError(t, w.Close()) out, err := io.ReadAll(r) assert.NoError(t, err)
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Sat Mar 16 00:20:01 GMT 2024 - 2.5K bytes - Viewed (0) -
istioctl/pkg/writer/compare/sds/writer.go
// limitations under the License. package sdscompare import ( "encoding/json" "fmt" "io" "strings" "text/tabwriter" ) // SDSWriter takes lists of SecretItem or SecretItemDiff and prints them through supplied output writer type SDSWriter interface { PrintSecretItems([]SecretItem) error PrintDiffs([]SecretItemDiff) error } type Format int const (
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Fri Apr 21 14:17:23 GMT 2023 - 4.1K bytes - Viewed (0) -
cni/pkg/nodeagent/net.go
return nil } func (s *NetServer) sendPodToZtunnelAndWaitForAck(ctx context.Context, pod *corev1.Pod, netns Netns) error { return s.ztunnelServer.PodAdded(ctx, pod, netns) } // ConstructInitialSnapshot takes a "snapshot" of current ambient pods and // // 1. Constructs a ztunnel state message to initialize ztunnel // 2. Syncs the host ipset func (s *NetServer) ConstructInitialSnapshot(ambientPods []*corev1.Pod) error {
Go - Registered: Wed May 08 22:53:08 GMT 2024 - Last Modified: Tue Apr 30 22:24:38 GMT 2024 - 12.2K bytes - Viewed (1)