- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for NewFakeContext (0.43 sec)
-
operator/cmd/mesh/operator_test.go
args = append(args, "--watchedNamespaces", test.watchedNamespaces) } kubeClientFunc = func() (kube.CLIClient, error) { return nil, nil } rootCmd := GetRootCmd(cli.NewFakeContext(&cli.NewFakeContextOption{ Version: "25", }), args) err := rootCmd.Execute() assert.NoError(t, err) readActions := map[string]bool{ "get": true, "list": true,
Go - Registered: Wed Mar 20 22:53:08 GMT 2024 - Last Modified: Tue Aug 29 14:15:33 GMT 2023 - 6.4K bytes - Viewed (0) -
istioctl/pkg/workload/workload_test.go
expectedException: false, expectedOutput: customYAML, }, } for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, c.description), func(t *testing.T) { 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)
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Mar 27 16:59:05 GMT 2024 - 14.6K bytes - Viewed (0) -
istioctl/pkg/waypoint/waypoint_test.go
makeGatewayWithRevision("bookinfo-rev", "bookinfo", true, true, "rev1"), }, expectedOutFile: "combined-gateway", }, } for _, tt := range cases { t.Run(tt.name, func(t *testing.T) { ctx := cli.NewFakeContext(&cli.NewFakeContextOption{ Namespace: "default", }) client, err := ctx.CLIClient() if err != nil { t.Fatal(err) } for _, gw := range tt.gateways {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Apr 04 15:53:09 GMT 2024 - 4.4K bytes - Viewed (0) -
istioctl/pkg/authz/authz_test.go
ExpectedOutput: `ACTION AuthorizationPolicy RULES ALLOW _anonymous_match_nothing_ 1 ALLOW httpbin.default 1 `, }, } authzCmd := checkCmd(cli.NewFakeContext(&cli.NewFakeContextOption{})) for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) { testutil.VerifyOutput(t, authzCmd, c) }) }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Jun 21 14:20:23 GMT 2023 - 1.4K bytes - Viewed (0) -
istioctl/pkg/analyze/analyze_test.go
c := testutil.TestCase{ Args: strings.Split( "-A --use-kube=false --failure-threshold ERROR testdata/analyze-file/public-gateway.yaml", " "), WantException: false, } analyze := Analyze(cli.NewFakeContext(nil)) testutil.VerifyOutput(t, analyze, c)
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Tue Oct 31 14:48:28 GMT 2023 - 1.8K bytes - Viewed (0) -
operator/cmd/mesh/profile-list_test.go
args := []string{"profile", "list", "--dry-run", "--manifests", filepath.Join(env.IstioSrc, "manifests")} kubeClientFunc = func() (kube.CLIClient, error) { return nil, nil } rootCmd := GetRootCmd(cli.NewFakeContext(&cli.NewFakeContextOption{ Version: "25", }), args) var out bytes.Buffer rootCmd.SetOut(&out) rootCmd.SetErr(&out) err := rootCmd.Execute() if err != nil {
Go - Registered: Wed Mar 20 22:53:08 GMT 2024 - Last Modified: Tue Oct 31 14:48:28 GMT 2023 - 1.5K bytes - Viewed (0) -
istioctl/pkg/metrics/metrics_test.go
WantException: true, }, { // case 1 Args: strings.Split("details", " "), ExpectedOutput: "Error: no Prometheus pods found\n", WantException: true, }, } metricCmd := Cmd(cli.NewFakeContext(nil)) for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) { testutil.VerifyOutput(t, metricCmd, c) }) } } func TestMetrics(t *testing.T) {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Oct 25 02:07:44 GMT 2023 - 7.9K bytes - Viewed (0) -
istioctl/pkg/proxyconfig/proxyconfig_test.go
wantException: true, }, } for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.args, " ")), func(t *testing.T) { verifyExecTestOutput(t, ProxyConfig(cli.NewFakeContext(&cli.NewFakeContextOption{ Results: c.execClientConfig, Namespace: "default", })), c) }) } } func verifyExecTestOutput(t *testing.T, cmd *cobra.Command, c execTestCase) {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Apr 10 21:51:29 GMT 2024 - 8.9K bytes - Viewed (0) -
istioctl/pkg/kubeinject/kubeinject_test.go
" --valuesFile testdata/inject-values.yaml", " "), GoldenFilename: "testdata/deployment/hello-with-proxyconfig-anno.yaml.injected", }, } kubeInject := InjectCommand(cli.NewFakeContext(nil)) for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) { testutil.VerifyOutput(t, kubeInject, c) cleanUpKubeInjectTestEnv() }) } }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Jun 15 15:02:17 GMT 2023 - 3.4K bytes - Viewed (0) -
istioctl/pkg/ztunnelconfig/ztunnelconfig_test.go
wantException: false, }, } for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.args, " ")), func(t *testing.T) { verifyExecTestOutput(t, ZtunnelConfig(cli.NewFakeContext(&cli.NewFakeContextOption{ Results: c.execClientConfig, Namespace: "default", })), c) }) } } func verifyExecTestOutput(t *testing.T, cmd *cobra.Command, c execTestCase) { t.Helper()
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Apr 10 21:51:29 GMT 2024 - 3.8K bytes - Viewed (0)