Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for NoError (0.18 sec)

  1. cni/pkg/nodeagent/net_test.go

    		netip.MustParseAddr("99.9.9.9"),
    		uint8(unix.IPPROTO_TCP),
    		string(podMeta.UID),
    		true,
    	).Return(nil)
    
    	err := netServer.AddPodToMesh(ctx, &corev1.Pod{ObjectMeta: podMeta}, podIPs, "fakenetns")
    	assert.NoError(t, err)
    	assert.Equal(t, 1, ztunnelServer.addedPods.Load())
    }
    
    func TestServerRemovePod(t *testing.T) {
    	ctx, cancel := context.WithCancel(context.Background())
    	defer cancel()
    	setupLogging()
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 14.3K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/informers_test.go

    		constants.DataplaneMode, constants.DataplaneModeAmbient))
    	_, err := client.Kube().CoreV1().Namespaces().Patch(ctx, ns.Name,
    		types.MergePatchType, labelsPatch, metav1.PatchOptions{})
    	assert.NoError(t, err)
    
    	waitForMockCalls()
    
    	assertPodAnnotated(t, client, pod)
    
    	// Assert expected calls actually made
    	fs.AssertExpectations(t)
    }
    
    func TestExistingPodAddedWhenDualStack(t *testing.T) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 01:03:24 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/server_test.go

    	m := meshDataplane{
    		kubeClient: fakeClientSet,
    		netServer:  server,
    	}
    
    	err := m.AddPodToMesh(fakeCtx, pod, podIPs, "")
    	assert.NoError(t, err)
    
    	pod, err = fakeClientSet.CoreV1().Pods("test").Get(fakeCtx, "test", metav1.GetOptions{})
    	assert.NoError(t, err)
    	assert.Equal(t, len(pod.Annotations), 1)
    	assert.Equal(t, pod.Annotations[constants.AmbientRedirection], constants.AmbientRedirectionEnabled)
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. cni/pkg/log/uds_test.go

    	// 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)
    
    	// For each level, there should be two lines, one from direct log,
    	// the other one from UDS server
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Mar 16 00:20:01 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  5. cni/pkg/plugin/cnieventclient_test.go

    	testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
    		defer req.Body.Close()
    		data, err := io.ReadAll(req.Body)
    		assert.NoError(t, err)
    
    		var msg nodeagent.CNIPluginAddEvent
    		err = json.Unmarshal(data, &msg)
    		assert.NoError(t, err)
    		assert.Equal(t, msg.PodName, testPod)
    		assert.Equal(t, msg.PodNamespace, testNS)
    		assert.Equal(t, msg.Netns, fakeCmdArgs.Netns)
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/cni-watcher_test.go

    		Netns:        "/var/netns/foo",
    		PodName:      "pod-bingo",
    		PodNamespace: "funkyns",
    	}
    
    	payload, _ := json.Marshal(valid)
    
    	addEvent, err := processAddEvent(payload)
    
    	assert.NoError(t, err)
    	assert.Equal(t, valid, addEvent)
    }
    
    func TestProcessAddEventBadPayload(t *testing.T) {
    	valid := CNIPluginAddEvent{
    		Netns:        "/var/netns/foo",
    		PodName:      "pod-bingo",
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Feb 02 08:18:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  7. istioctl/pkg/proxystatus/proxystatus_test.go

    			ctx := cli.NewFakeContext(&cli.NewFakeContextOption{
    				IstioNamespace: "istio-system",
    			})
    			if !c.noIstiod {
    				client, err := ctx.CLIClientWithRevision(c.revision)
    				assert.NoError(t, err)
    				_, err = client.Kube().CoreV1().Pods("istio-system").Create(context.TODO(), &corev1.Pod{
    					ObjectMeta: metav1.ObjectMeta{
    						Name:      "istiod-test",
    						Namespace: "istio-system",
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 08:28:50 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  8. istioctl/pkg/internaldebug/internal-debug_test.go

    			ctx := cli.NewFakeContext(&cli.NewFakeContextOption{
    				IstioNamespace: "istio-system",
    			})
    			if !c.noIstiod {
    				client, err := ctx.CLIClientWithRevision(c.revision)
    				assert.NoError(t, err)
    				_, err = client.Kube().CoreV1().Pods("istio-system").Create(context.TODO(), &corev1.Pod{
    					ObjectMeta: metav1.ObjectMeta{
    						Name:      "istiod-test",
    						Namespace: "istio-system",
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 08:28:50 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/ztunnelserver_test.go

    	// read the msg to delete from ztunnel
    	m, fds = readRequest(t, ztunClient)
    	assert.Equal(t, len(fds), 0)
    	assert.Equal(t, m.Payload.(*zdsapi.WorkloadRequest_Del).Del.Uid, uid)
    	sendAck(ztunClient)
    
    	assert.NoError(t, <-errChan)
    
    	ztunClient.Close()
    	// this will retry for a bit, so shouldn't flake
    	mt.Assert(ztunnelConnected.Name(), nil, monitortest.Exactly(0))
    }
    
    func TestZtunnelPodAdded(t *testing.T) {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  10. istioctl/pkg/writer/envoy/configdump/route_test.go

    			if err := cw.Prime(cd); err != nil {
    				t.Errorf("failed to parse config dump: %s", err)
    			}
    			err := cw.PrintRouteSummary(RouteFilter{Verbose: true})
    			assert.NoError(t, err)
    
    			wantOutputFile := path.Join("testdata/routes", tt.name, "output.txt")
    			util.CompareContent(t, gotOut.Bytes(), wantOutputFile)
    		})
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 2.8K bytes
    - Viewed (0)
Back to top