- Sort Score
- Result 10 results
- Languages All
Results 11 - 16 of 16 for NewFakeContext (0.13 sec)
-
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()
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Apr 10 21:51:29 UTC 2024 - 3.8K bytes - Viewed (0) -
istioctl/pkg/proxystatus/proxystatus_test.go
} t.Cleanup(func() { multixds.GetXdsResponse = xds.GetXdsResponse }) for i, c := range cases { t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.args, " ")), func(t *testing.T) { ctx := cli.NewFakeContext(&cli.NewFakeContextOption{ IstioNamespace: "istio-system", }) if !c.noIstiod { client, err := ctx.CLIClientWithRevision(c.revision) assert.NoError(t, err)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Mar 15 08:28:50 UTC 2024 - 5.5K bytes - Viewed (0) -
istioctl/pkg/multicluster/remote_secret_test.go
// ClusterName: testCluster, KubeOptions: KubeOptions{ Namespace: testNamespace, }, Type: c.secType, SecretName: c.secretName, } ctx := cli.NewFakeContext(&cli.NewFakeContextOption{ IstioNamespace: "istio-system", Objects: c.objs, Namespace: testNamespace, Version: c.k8sMinorVersion, }) client, err := ctx.CLIClient()
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Oct 24 17:36:49 UTC 2024 - 20.7K bytes - Viewed (0) -
istioctl/pkg/cli/context.go
Results map[string][]byte // Objects are the objects to be applied to the fake client Objects []runtime.Object // Version is the version of the fake client Version string } func NewFakeContext(opts *NewFakeContextOption) Context { if opts == nil { opts = &NewFakeContextOption{} } ns := opts.Namespace ins := opts.IstioNamespace return &fakeInstance{ clients: map[string]kube.CLIClient{},
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 23 19:31:32 UTC 2024 - 8.9K bytes - Viewed (0) -
istioctl/pkg/describe/describe_test.go
} } } func verifyExecAndK8sConfigTestCaseTestOutput(t *testing.T, c execAndK8sConfigTestCase) { t.Helper() ctx := cli.NewFakeContext(&cli.NewFakeContextOption{ Namespace: c.namespace, IstioNamespace: c.istioNamespace, Results: c.configDumps, }) client, err := ctx.CLIClient() assert.NoError(t, err)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Thu Aug 01 20:04:20 UTC 2024 - 30.8K bytes - Viewed (0) -
istioctl/pkg/validate/validate_test.go
wantError: true, // Since the directory has invalid files }, } for i, c := range cases { t.Run(fmt.Sprintf("[%v] %v", i, c.name), func(t *testing.T) { ctx := cli.NewFakeContext(&cli.NewFakeContextOption{ IstioNamespace: "istio-system", }) validateCmd := NewValidateCommand(ctx) validateCmd.SilenceUsage = true validateCmd.SetArgs(c.args)
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Aug 02 16:18:14 UTC 2024 - 21.4K bytes - Viewed (0)