Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for testCase (0.21 sec)

  1. istioctl/pkg/config/config_test.go

    	"fmt"
    	"strings"
    	"testing"
    
    	"github.com/spf13/viper"
    
    	"istio.io/istio/istioctl/pkg/util/testutil"
    	"istio.io/istio/pkg/config/constants"
    )
    
    func TestConfigList(t *testing.T) {
    	cases := []testutil.TestCase{
    		//{ // case 0
    		//	Args:           strings.Split("get istioNamespace", " "),
    		//	ExpectedRegexp: regexp.MustCompile("Configure istioctl defaults"),
    		//	WantException:  false,
    		//},
    		{ // case 1
    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. common/scripts/setup_env.sh

    # without testing properly.
    #
    # This function will properly handle any type of path including those with spaces using the
    # loading pattern specified by *kubectl config*.
    #
    # testcase: "a:b c:d"
    # testcase: "a b:c d:e f"
    # testcase: "a b:c:d e"
    parse_KUBECONFIG () {
    TMPDIR=""
    if [[ "$1" =~ ([^:]*):(.*) ]]; then
      while true; do
        rematch=${BASH_REMATCH[1]}
        add_KUBECONFIG_if_exists "$rematch"
    Shell Script
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 23 19:52:28 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  3. istioctl/pkg/authz/authz_test.go

    package authz
    
    import (
    	"fmt"
    	"strings"
    	"testing"
    
    	"istio.io/istio/istioctl/pkg/cli"
    	"istio.io/istio/istioctl/pkg/util/testutil"
    )
    
    func TestAuthz(t *testing.T) {
    	cases := []testutil.TestCase{
    		{
    			Args:           []string{"-f fake.yaml"},
    			ExpectedOutput: "Error: failed to get config dump from file  fake.yaml: open  fake.yaml: no such file or directory\n",
    			WantException:  true,
    		},
    		{
    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

    )
    
    // mockPromAPI lets us mock calls to Prometheus API
    type mockPromAPI struct {
    	cannedResponse map[string]prometheus_model.Value
    }
    
    func TestMetricsNoPrometheus(t *testing.T) {
    	cases := []testutil.TestCase{
    		{ // case 0
    			Args:           []string{},
    			ExpectedRegexp: regexp.MustCompile("Error: metrics requires workload name\n"),
    			WantException:  true,
    		},
    		{ // case 1
    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/workload/workload_test.go

      template:
        ports:
          grpc: 3550
          http: 8080
        serviceAccount: test
    `
    )
    
    type testcase struct {
    	description       string
    	expectedException bool
    	args              []string
    	expectedOutput    string
    	namespace         string
    }
    
    func TestWorkloadGroupCreate(t *testing.T) {
    	cases := []testcase{
    		{
    			description:       "Invalid command args - missing service name and namespace",
    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)
  6. istioctl/pkg/util/testutil/util.go

    	"istio.io/istio/pilot/test/util"
    )
    
    type TestCase struct {
    	Args []string
    
    	// Typically use one of the three
    	ExpectedOutput string         // Expected constant output
    	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)
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. cni/test/install_k8s_test.go

    package install_test
    
    import (
    	"testing"
    
    	install "istio.io/istio/cni/test"
    	"istio.io/istio/pkg/test/env"
    )
    
    var (
    	Hub = "gcr.io/istio-release"
    	Tag = "master-latest-daily"
    )
    
    type testCase struct {
    	name             string
    	chainedCNIPlugin bool
    	preConfFile      string
    	resultFileName   string
    	// Must set chainedCNIPlugin to true if delayedConfFile is specified
    	delayedConfFile        string
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Jul 27 18:01:48 GMT 2022
    - 8K bytes
    - Viewed (0)
  8. istioctl/pkg/kubeinject/kubeinject_test.go

    import (
    	"fmt"
    	"regexp"
    	"strings"
    	"testing"
    
    	"istio.io/istio/istioctl/pkg/cli"
    	"istio.io/istio/istioctl/pkg/util/testutil"
    )
    
    func TestKubeInject(t *testing.T) {
    	cases := []testutil.TestCase{
    		{ // case 0
    			Args:           []string{},
    			ExpectedRegexp: regexp.MustCompile(`filename not specified \(see --filename or -f\)`),
    			WantException:  true,
    		},
    		{ // case 1
    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)
  9. istioctl/pkg/dashboard/dashboard_test.go

    import (
    	"fmt"
    	"regexp"
    	"strings"
    	"testing"
    
    	"istio.io/istio/istioctl/pkg/cli"
    	"istio.io/istio/istioctl/pkg/util/testutil"
    )
    
    func TestDashboard(t *testing.T) {
    	cases := []testutil.TestCase{
    		{ // case 0
    			Args:           strings.Split("--browser=false", " "),
    			ExpectedRegexp: regexp.MustCompile("Access to Istio web UIs"),
    		},
    		{ // case 1
    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)
  10. istioctl/pkg/multicluster/remote_secret_test.go

    	cases := []struct {
    		testName string
    
    		objs       []runtime.Object
    		name       string
    		secType    SecretType
    		secretName string
    
    		// inject errors
    		badStartingConfig bool
    		outputWriterError error
    
    		want            string
    		wantErrStr      string
    		k8sMinorVersion string
    	}{
    		{
    			testName:   "fail to create remote secret token",
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 20.6K bytes
    - Viewed (0)
Back to top