Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 56 for NewWithT (0.8 sec)

  1. operator/cmd/mesh/manifest-generate_test.go

    func TestManifestGenerateAllOff(t *testing.T) {
    	g := NewWithT(t)
    	m, _, err := generateManifest("all_off", "", liveCharts, nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	objs, err := parseObjectSetFromManifest(m)
    	if err != nil {
    		t.Fatal(err)
    	}
    	g.Expect(objs.size()).Should(Equal(0))
    }
    
    func TestManifestGenerateFlagsMinimalProfile(t *testing.T) {
    	g := NewWithT(t)
    	// Change profile from empty to minimal using flag.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 18:05:06 UTC 2024
    - 43.5K bytes
    - Viewed (0)
  2. pkg/kube/watcher/configmapwatcher/configmapwatcher_test.go

    	cms := client.Kube().CoreV1().ConfigMaps(configMapNamespace)
    	for i, step := range steps {
    		resetCalled()
    
    		t.Run(fmt.Sprintf("[%v]", i), func(t *testing.T) {
    			g := NewWithT(t)
    
    			switch {
    			case step.added != nil:
    				_, err := cms.Create(context.TODO(), step.added, metav1.CreateOptions{})
    				g.Expect(err).Should(BeNil())
    			case step.updated != nil:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  3. pkg/config/analysis/analyzer_test.go

    func (ctx *context) SetAnalyzer(_ string)                                               {}
    
    func TestCombinedAnalyzer(t *testing.T) {
    	g := NewWithT(t)
    
    	col1 := newSchema("col1")
    	col2 := newSchema("col2")
    	col3 := newSchema("col3")
    	col4 := newSchema("col4")
    
    	a1 := &analyzer{name: "a1", inputs: []config.GroupVersionKind{col1.GroupVersionKind()}}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. pkg/kube/inject/watcher_test.go

    		{updated: badCM3},
    		{updated: cm},
    
    		// Handle deletion.
    		{deleted: cm},
    		{added: cm},
    	}
    
    	for i, step := range steps {
    		t.Run(fmt.Sprintf("[%v]", i), func(t *testing.T) {
    			g := NewWithT(t)
    
    			switch {
    			case step.added != nil:
    				_, err := cms.Create(context.TODO(), step.added, metav1.CreateOptions{})
    				g.Expect(err).Should(BeNil())
    			case step.updated != nil:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 28 04:22:19 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. pkg/config/analysis/analyzers/multicluster_analyzers_test.go

    	// For each test case, verify we get the expected messages as output
    	for _, tc := range mcTestGrid {
    		tc := tc // Capture range variable so subtests work correctly
    		t.Run(tc.name, func(t *testing.T) {
    			g := NewWithT(t)
    
    			// Set up a hook to record which collections are accessed by each analyzer
    			analyzerName := tc.analyzer.Metadata().Name
    			cr := func(col config.GroupVersionKind) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 08:32:06 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. pilot/pkg/model/cluster_local_test.go

    						},
    					},
    				},
    			},
    			host:     "s.ns3.svc.cluster.local",
    			expected: false,
    		},
    	}
    
    	for _, c := range cases {
    		t.Run(c.name, func(t *testing.T) {
    			g := NewWithT(t)
    
    			env := &model.Environment{Watcher: mesh.NewFixedWatcher(c.m)}
    			env.Init()
    
    			clusterLocal := env.ClusterLocal().GetClusterLocalHosts().IsClusterLocal(host.Name(c.host))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  7. pkg/config/mesh/watcher_test.go

    	"istio.io/istio/pkg/config/mesh"
    	"istio.io/istio/pkg/filewatcher"
    	"istio.io/istio/pkg/test/util/assert"
    	"istio.io/istio/pkg/util/protomarshal"
    )
    
    func TestNewWatcherWithBadInputShouldFail(t *testing.T) {
    	g := NewWithT(t)
    	_, err := mesh.NewFileWatcher(filewatcher.NewWatcher(), "", false)
    	g.Expect(err).ToNot(BeNil())
    }
    
    func TestWatcherShouldNotifyHandlers(t *testing.T) {
    	watcherShouldNotifyHandlers(t, false)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 3K bytes
    - Viewed (0)
  8. pkg/config/analysis/analyzers/analyzers_test.go

    func TestAnalyzersInAll(t *testing.T) {
    	g := NewWithT(t)
    
    	var allNames []string
    	for _, a := range All() {
    		allNames = append(allNames, a.Metadata().Name)
    	}
    
    	for _, tc := range testGrid {
    		if !tc.skipAll {
    			g.Expect(allNames).To(ContainElement(tc.analyzer.Metadata().Name))
    		}
    	}
    }
    
    func TestAnalyzersHaveUniqueNames(t *testing.T) {
    	g := NewWithT(t)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 14 07:22:31 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  9. pilot/pkg/networking/core/loadbalancer/loadbalancer_test.go

    				}
    				if !reflect.DeepEqual(weights, tt.expected) {
    					t.Errorf("Got weights %v expected %v", weights, tt.expected)
    				}
    			})
    		}
    	})
    
    	t.Run("Failover: all priorities", func(t *testing.T) {
    		g := NewWithT(t)
    		env := buildEnvForClustersWithFailover()
    		cluster := buildFakeCluster()
    		ApplyLocalityLoadBalancer(cluster.LoadAssignment, nil, locality, nil, env.Mesh().LocalityLbSetting, true)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 23 05:38:57 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  10. pilot/pkg/networking/core/route/retry/retry_test.go

    					t.Fatalf("Expected %v, actual %v", expected, policy.RetryPriority)
    				}
    			},
    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			g := NewWithT(t)
    			policy := retry.ConvertPolicy(tc.route.Retries, false)
    			if tc.assertFunc != nil {
    				tc.assertFunc(g, policy)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 14:12:39 UTC 2024
    - 7.7K bytes
    - Viewed (0)
Back to top