Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 275 for helper (0.14 sec)

  1. operator/cmd/mesh/test-util_test.go

    func mustSelect(t test.Failer, selector map[string]string, labels map[string]string) {
    	t.Helper()
    	kselector := labels2.Set(selector).AsSelectorPreValidated()
    	if !kselector.Matches(labels2.Set(labels)) {
    		t.Fatalf("%v does not select %v", selector, labels)
    	}
    }
    
    func mustNotSelect(t test.Failer, selector map[string]string, labels map[string]string) {
    	t.Helper()
    	kselector := labels2.Set(selector).AsSelectorPreValidated()
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 15.3K bytes
    - Viewed (0)
  2. internal/http/dial_dnscache.go

    	"time"
    )
    
    // LookupHost is a function to make custom lookupHost for optional cached DNS requests
    type LookupHost func(ctx context.Context, host string) (addrs []string, err error)
    
    // DialContextWithLookupHost is a helper function which returns `net.DialContext` function.
    // It randomly fetches an IP via custom LookupHost function and dials it by the given dial
    // function. LookupHost may implement an internal DNS caching implementation, lookupHost
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 03 19:30:51 GMT 2023
    - 2.6K bytes
    - Viewed (0)
  3. operator/cmd/mesh/profile-diff_test.go

    			verifyProfileDiffCommandCaseOutput(t, c, by.String(), err)
    		})
    	}
    }
    
    func verifyProfileDiffCommandCaseOutput(t *testing.T, c profileDiffTestcase, output string, fErr error) {
    	t.Helper()
    
    	if c.expectedString != "" && !strings.Contains(output, c.expectedString) {
    		t.Fatalf("Output didn't match for 'istioctl %s'\n got %v\nwant: %v", c.args, output, c.expectedString)
    	}
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Jan 10 05:10:03 GMT 2024
    - 3.6K bytes
    - Viewed (1)
  4. src/cmd/addr2line/addr2line_test.go

    	os.Setenv("GO_ADDR2LINETEST_IS_ADDR2LINE", "1") // Set for subprocesses to inherit.
    	os.Exit(m.Run())
    }
    
    // addr2linePath returns the path to the "addr2line" binary to run.
    func addr2linePath(t testing.TB) string {
    	t.Helper()
    	testenv.MustHaveExec(t)
    
    	addr2linePathOnce.Do(func() {
    		addr2lineExePath, addr2linePathErr = os.Executable()
    	})
    	if addr2linePathErr != nil {
    		t.Fatal(addr2linePathErr)
    	}
    	return addr2lineExePath
    }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Feb 21 22:16:54 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. internal/grid/benchmark_test.go

    			benchmarkGridRequests(b, n)
    		})
    	}
    }
    
    func benchmarkGridRequests(b *testing.B, n int) {
    	defer testlogger.T.SetErrorTB(b)()
    	errFatal := func(err error) {
    		b.Helper()
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    	rpc := NewSingleHandler[*testRequest, *testResponse](handlerTest2, newTestRequest, newTestResponse)
    	grid, err := SetupTestGrid(n)
    	errFatal(err)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 12.2K bytes
    - Viewed (0)
  6. cni/pkg/iptables/iptables_test.go

    }
    
    func ipstr(ipv6 bool) string {
    	if ipv6 {
    		return "ipv6"
    	}
    	return "ipv4"
    }
    
    func compareToGolden(t *testing.T, ipv6 bool, name string, actual []string) {
    	t.Helper()
    	gotBytes := []byte(strings.Join(actual, "\n"))
    	goldenFile := filepath.Join("testdata", name+".golden")
    	if ipv6 {
    		goldenFile = filepath.Join("testdata", name+"_ipv6.golden")
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  7. istioctl/pkg/internaldebug/internal-debug_test.go

    				assert.NoError(t, err)
    			}
    			verifyExecTestOutput(t, DebugCommand(ctx), c)
    		})
    	}
    }
    
    func verifyExecTestOutput(t *testing.T, cmd *cobra.Command, c execTestCase) {
    	t.Helper()
    
    	var out bytes.Buffer
    	cmd.SetArgs(c.args)
    	cmd.SilenceUsage = true
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    
    	fErr := cmd.Execute()
    	output := out.String()
    
    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)
  8. operator/cmd/mesh/manifest-generate_test.go

    	t.Helper()
    	path := mustGetPath(t, obj, "webhooks")
    	by, err := json.Marshal(path)
    	if err != nil {
    		t.Fatal(err)
    	}
    	var mwh []v1.MutatingWebhook
    	if err := json.Unmarshal(by, &mwh); err != nil {
    		t.Fatal(err)
    	}
    	return mwh
    }
    
    func getWebhooks(t *testing.T, setFlags string, webhookName string) []v1.MutatingWebhook {
    	t.Helper()
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Apr 18 18:16:49 GMT 2024
    - 43.5K bytes
    - Viewed (0)
  9. internal/logger/target/testlogger/testlogger.go

    	t.current.Store(nil)
    }
    
    func (t *testLogger) Send(ctx context.Context, entry interface{}) error {
    	tb := t.current.Load()
    	var logf func(format string, args ...any)
    	if tb != nil {
    		tbb := *tb
    		tbb.Helper()
    		switch t.action.Load() {
    		case errorMessage:
    			logf = tbb.Errorf
    		case fatalMessage:
    			logf = tbb.Fatalf
    		default:
    			logf = tbb.Logf
    		}
    	} else {
    		switch t.action.Load() {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 4K bytes
    - Viewed (0)
  10. cmd/net.go

    		endpoint := fmt.Sprintf("%s://%s", getURLScheme(globalIsTLS), net.JoinHostPort(ip, globalMinioPort))
    		apiEndpoints = append(apiEndpoints, endpoint)
    	}
    
    	return apiEndpoints
    }
    
    // isHostIP - helper for validating if the provided arg is an ip address.
    func isHostIP(ipAddress string) bool {
    	host, _, err := net.SplitHostPort(ipAddress)
    	if err != nil {
    		host = ipAddress
    	}
    	// Strip off IPv6 zone information.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 26 15:00:38 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top