Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for NoError (0.2 sec)

  1. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Sat Mar 16 00:20:01 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  2. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  3. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 08:28:50 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  4. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  5. 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 May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 08:28:50 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  6. istioctl/pkg/writer/pilot/status_test.go

    			for key, ss := range tt.input {
    				input[key] = ss
    			}
    
    			err := sw.PrintAll(input)
    			if tt.wantErr {
    				assert.Error(t, err)
    			} else {
    				assert.NoError(t, err)
    			}
    			want, _ := os.ReadFile(tt.want)
    			if err := util.Compare(got.Bytes(), want); err != nil {
    				t.Errorf(err.Error())
    			}
    		})
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 6.5K bytes
    - Viewed (0)
  7. istioctl/pkg/injector/injector-list_test.go

    		}),
    	}
    
    	client := kube.NewFakeClient(nss...)
    	expected := sets.New[string]("default", "no-ambient")
    	actual, err := getNamespaces(context.TODO(), client, "istio-system")
    	assert.NoError(t, err)
    	for _, ns := range actual {
    		assert.Equal(t, true, expected.Contains(ns.Name))
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu May 02 21:29:40 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  8. istioctl/pkg/proxyconfig/proxyconfig_test.go

    		Namespace: "default",
    	}))
    	cmd.SetArgs([]string{
    		"all",
    		"-f", "testdata/config_dump.json",
    	})
    	out := bytes.Buffer{}
    	cmd.SetOut(&out)
    	assert.NoError(t, cmd.Execute())
    	expected := util.ReadFile(t, "testdata/config_dump_summary.txt")
    
    	if err := assert.Compare(out.String(), string(expected)); err != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Apr 10 21:51:29 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  9. cmd/admin-handler-utils.go

    	Message    string
    	StatusCode int
    }
    
    func (ae AdminError) Error() string {
    	return ae.Message
    }
    
    func toAdminAPIErr(ctx context.Context, err error) APIError {
    	if err == nil {
    		return noError
    	}
    
    	var apiErr APIError
    	switch e := err.(type) {
    	case policy.Error:
    		apiErr = APIError{
    			Code:           "XMinioMalformedIAMPolicy",
    			Description:    e.Error(),
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top