Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for VerifyOutput (0.23 sec)

  1. istioctl/pkg/config/config_test.go

    xds-port                15012            default
    `,
    			WantException: false,
    		},
    	}
    
    	for i, c := range cases {
    		t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) {
    			testutil.VerifyOutput(t, Cmd(), c)
    		})
    	}
    }
    
    func init() {
    	viper.SetDefault("istioNamespace", constants.IstioSystemNamespace)
    	viper.SetDefault("xds-port", 15012)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  2. istioctl/pkg/analyze/analyze_test.go

    		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)
  3. istioctl/pkg/authz/authz_test.go

    `,
    		},
    	}
    
    	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)
  4. istioctl/pkg/metrics/metrics_test.go

    			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) {
    	cases := []testutil.TestCase{
    		{ // case 0
    			Args:           strings.Split("details", " "),
    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)
  5. istioctl/pkg/util/testutil/util.go

    	ExpectedRegexp *regexp.Regexp // Expected regexp output
    	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()
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2K bytes
    - Viewed (0)
  6. istioctl/pkg/kubeinject/kubeinject_test.go

    		},
    	}
    
    	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()
    		})
    	}
    }
    
    func cleanUpKubeInjectTestEnv() {
    	meshConfigFile = ""
    	injectConfigFile = ""
    	valuesFile = ""
    	inFilename = ""
    	iopFilename = ""
    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)
  7. istioctl/pkg/dashboard/dashboard_test.go

    		Namespace: "istio-system",
    	}))
    	for i, c := range cases {
    		t.Run(fmt.Sprintf("case %d %s", i, strings.Join(c.Args, " ")), func(t *testing.T) {
    			testutil.VerifyOutput(t, dbCmd, c)
    			cleanupTestCase()
    		})
    	}
    }
    
    func cleanupTestCase() {
    	labelSelector = ""
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Nov 21 01:17:24 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top