Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for helper (0.29 sec)

  1. istioctl/pkg/workload/workload_test.go

    			verifyTestcaseOutput(t, Cmd(cli.NewFakeContext(nil)), c)
    		})
    	}
    }
    
    func verifyTestcaseOutput(t *testing.T, cmd *cobra.Command, c testcase) {
    	t.Helper()
    
    	var out bytes.Buffer
    	cmd.SetArgs(c.args)
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    	cmd.SilenceUsage = true
    	if c.namespace != "" {
    		namespace = c.namespace
    	}
    
    	fErr := cmd.Execute()
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Mar 27 16:59:05 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  2. istioctl/pkg/util/configdump/wrapper.go

    		msg := exprpb.Type{TypeKind: &exprpb.Type_Dyn{Dyn: &emptypb.Empty{}}}
    		return msg.ProtoReflect().Type(), nil
    	}
    	return typ, nil
    }
    
    // Wrapper is a wrapper around the Envoy ConfigDump
    // It has extra helper functions for handling any/struct/marshal protobuf pain
    type Wrapper struct {
    	*admin.ConfigDump
    }
    
    // UnmarshalJSON is a custom unmarshaller to handle protobuf pain
    func (w *Wrapper) UnmarshalJSON(b []byte) error {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sun Apr 21 17:42:54 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. cni/test/install_cni.go

    		return value
    	}
    	return fallback
    }
    
    func setEnv(key, value string, t *testing.T) {
    	t.Helper()
    	err := os.Setenv(key, value)
    	if err != nil {
    		t.Fatalf("Couldn't set environment variable, err: %v", err)
    	}
    }
    
    func mktemp(dir, prefix string, t *testing.T) string {
    	t.Helper()
    	tempDir, err := os.MkdirTemp(dir, prefix)
    	if err != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. cni/pkg/iptables/iptables.go

    	ZtunnelInboundPort          = 15008
    	ZtunnelOutboundPort         = 15001
    	ZtunnelInboundPlaintextPort = 15006
    	ProbeIPSet                  = "istio-inpod-probes"
    )
    
    var log = istiolog.RegisterScope("iptables", "iptables helper")
    
    type Config struct {
    	RestoreFormat bool `json:"RESTORE_FORMAT"`
    	TraceLogging  bool `json:"IPTABLES_TRACE_LOGGING"`
    	EnableIPv6    bool `json:"ENABLE_INBOUND_IPV6"`
    	RedirectDNS   bool `json:"REDIRECT_DNS"`
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue May 07 19:54:50 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  7. istioctl/cmd/root_test.go

    	"github.com/spf13/cobra"
    )
    
    func checkHelpForFlag(t *testing.T, gotHelpText, flag string, wantExists bool) {
    	t.Helper()
    
    	if strings.Contains(gotHelpText, flag) != wantExists {
    		if wantExists {
    			t.Errorf("%q flag was expected but not found in help text", flag)
    		} else {
    			t.Errorf("%q flag was found in help text but not expected", flag)
    		}
    	}
    }
    
    func TestHideInheritedFlags(t *testing.T) {
    	const (
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 15 17:59:55 GMT 2021
    - 2.4K bytes
    - Viewed (0)
  8. istioctl/pkg/util/testutil/util.go

    	GoldenFilename string         // Expected output stored in golden file
    
    	WantException bool
    }
    
    func VerifyOutput(t *testing.T, cmd *cobra.Command, c TestCase) {
    	t.Helper()
    
    	cmd.SetArgs(c.Args)
    
    	var out bytes.Buffer
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    	cmd.SilenceUsage = true
    
    	fErr := cmd.Execute()
    	output := out.String()
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. istioctl/pkg/util/handlers/handlers_test.go

    				return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: body}, nil
    			case p == "/namespaces/test/deployments/foo" && m == "GET":
    				body := cmdtesting.ObjBody(codec, attachDeploy("test"))
    				return &http.Response{StatusCode: http.StatusOK, Header: cmdtesting.DefaultHeader(), Body: body}, nil
    			default:
    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)
  10. operator/cmd/mesh/manifest_shared_test.go

    		args += " " + flags
    	}
    	if fileSelect != nil {
    		filters := []string{}
    		filters = append(filters, fileSelect...)
    		// Everything needs these
    		filters = append(filters, "templates/_affinity.tpl", "templates/_helpers.tpl", "templates/zzz_profile.yaml")
    		args += " --filter " + strings.Join(filters, ",")
    	}
    	args += " --set installPackagePath=" + string(chartSource)
    	return runCommand(args)
    }
    
    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)
Back to top