Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 322 for expect (0.28 sec)

  1. istioctl/pkg/writer/envoy/configdump/listener_test.go

    						Pipe: &core.Pipe{Path: "unix:///dev/shm/uds.socket"},
    					},
    				},
    			},
    			expect: true,
    		},
    	}
    
    	for _, tt := range tests {
    		t.Run(tt.desc, func(t *testing.T) {
    			if got := tt.inFilter.Verify(tt.inListener); got != tt.expect {
    				t.Errorf("%s: expect %v got %v", tt.desc, tt.expect, got)
    			}
    		})
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Mon Sep 11 15:29:30 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  2. istioctl/pkg/util/formatting/formatter_test.go

      origin: GrandCastle
    `
    
    	g.Expect(output).To(Equal(expectedOutput))
    }
    
    func TestFormatter_PrintEmpty(t *testing.T) {
    	g := NewWithT(t)
    
    	msgs := diag.Messages{}
    
    	logOutput, _ := Print(msgs, LogFormat, false)
    	g.Expect(logOutput).To(Equal(""))
    
    	jsonOutput, _ := Print(msgs, JSONFormat, false)
    	g.Expect(jsonOutput).To(Equal("[]"))
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  3. cni/pkg/install/kubeconfig_test.go

    			}
    			result, err := createKubeConfig(cfg)
    			if err != nil {
    				if !c.expectedFailure {
    					t.Fatalf("did not expect failure: %v", err)
    				}
    				// Successful test case expecting failure
    				return
    			} else if c.expectedFailure {
    				t.Fatalf("expected failure")
    			}
    
    			goldenFilepath := "testdata/kubeconfig-tls"
    			if c.skipTLSVerify {
    				goldenFilepath = "testdata/kubeconfig-skip-tls"
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 03:52:24 GMT 2024
    - 5.1K bytes
    - Viewed (0)
  4. cni/pkg/plugin/plugin_test.go

    	mockIntercept := testDoAddRun(t, buildMockConf(false, ""), testNSName, pod, ns)
    
    	if len(mockIntercept.lastRedirect) == 0 {
    		t.Fatalf("expected nsenterFunc to be called")
    	}
    	r := mockIntercept.lastRedirect[len(mockIntercept.lastRedirect)-1]
    	if r.includeInboundPorts != "*" {
    		t.Fatalf("expect includeInboundPorts has value '*' set by istio, actual %v", r.includeInboundPorts)
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed May 08 15:58:51 GMT 2024
    - 17.5K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/envoy/configdump/route_test.go

    			expected: "example.com, www.example.com + 1 more...",
    		},
    	}
    
    	for _, tt := range tests {
    		t.Run(tt.desc, func(t *testing.T) {
    			if got := describeRouteDomains(tt.domains); got != tt.expected {
    				t.Errorf("%s: expect %v got %v", tt.desc, tt.expected, got)
    			}
    		})
    	}
    }
    
    func TestPrintRoutesSummary(t *testing.T) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  6. istioctl/pkg/tag/generate_test.go

    	testGenerateOption(t, true, func(t *testing.T, actual, expected []admitv1.MutatingWebhook) {
    		assert.Equal(t, actual, expected)
    	})
    
    	// Test generate option 'false', should modify webhooks
    	testGenerateOption(t, false, func(t *testing.T, actual, expected []admitv1.MutatingWebhook) {
    		if err := assert.Compare(actual, expected); err == nil {
    			t.Errorf("expected diff between webhooks, got none")
    		}
    	})
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Jan 16 17:43:49 GMT 2024
    - 12.1K bytes
    - Viewed (0)
  7. istioctl/pkg/analyze/analyze_test.go

    			nil,
    			"",
    		),
    		diag.NewMessage(
    			diag.NewMessageType(diag.Warning, "A1", "Template: %q"),
    			nil,
    			"",
    		),
    	}
    
    	err := errorIfMessagesExceedThreshold(msgs)
    
    	g.Expect(err).To(BeIdenticalTo(AnalyzerFoundIssuesError{}))
    }
    
    func TestNoErrorIfMessageLevelsBelowThreshold(t *testing.T) {
    	g := NewWithT(t)
    
    	msgs := []diag.Message{
    		diag.NewMessage(
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/ztunnelserver.go

    			}
    
    		case <-time.After(ztunnelKeepAliveCheckInterval):
    			// do a short read, just to see if the connection to ztunnel is
    			// still alive. As ztunnel shouldn't send anything unless we send
    			// something first, we expect to get an os.ErrDeadlineExceeded error
    			// here if the connection is still alive.
    			// note that unlike tcp connections, reading is a good enough test here.
    			_, err := conn.readMessage(time.Second / 100)
    			switch {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  9. cni/pkg/install/install.go

    	// Install kubeconfig (if needed) - we write/update this in the shared node CNI netdir,
    	// which may be watched by other CNIs, and so we don't want to trigger writes to this file
    	// unless it's missing or the contents are not what we expect.
    	if err := maybeWriteKubeConfigFile(in.cfg); err != nil {
    		cniInstalls.With(resultLabel.Value(resultCreateKubeConfigFailure)).Increment()
    		return copiedFiles, fmt.Errorf("write kubeconfig: %v", err)
    	}
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Feb 08 18:52:24 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  10. cni/pkg/nodeagent/pod_cache_test.go

    	if netns1 != netnsTaken {
    		t.Fatalf("Expected the original Netns for the same uid, got %p and %p", netns1, ns)
    	}
    	if nil != p.Take(string(pod.UID)) {
    		// expect nil because we already took it
    		t.Fatalf("Expected nil Netns for the same uid twice")
    	}
    }
    
    var counter atomic.Int64
    
    func inc() uintptr {
    	return uintptr(counter.Add(1))
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top