Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for TestWatch (0.28 sec)

  1. staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher_test.go

    }
    
    func TestCount(t *testing.T) {
    	ctx, cacher, terminate := testSetup(t)
    	t.Cleanup(terminate)
    	storagetesting.RunTestCount(ctx, t, cacher)
    }
    
    func TestWatch(t *testing.T) {
    	ctx, cacher, terminate := testSetup(t)
    	t.Cleanup(terminate)
    	storagetesting.RunTestWatch(ctx, t, cacher)
    }
    
    func TestWatchFromZero(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 17K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go

    )
    
    func RunTestWatch(ctx context.Context, t *testing.T, store storage.Interface) {
    	testWatch(ctx, t, store, false)
    	testWatch(ctx, t, store, true)
    }
    
    // It tests that
    // - first occurrence of objects should notify Add event
    // - update should trigger Modified event
    // - update that gets filtered should trigger Deleted event
    func testWatch(ctx context.Context, t *testing.T, store storage.Interface, recursive bool) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  3. pkg/registry/core/pod/storage/storage_test.go

    	test := genericregistrytest.New(t, storage.Store)
    	test.TestList(validNewPod())
    }
    
    func TestWatch(t *testing.T) {
    	storage, _, _, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.Store.DestroyFunc()
    	test := genericregistrytest.New(t, storage.Store)
    	test.TestWatch(
    		validNewPod(),
    		// matching labels
    		[]labels.Set{},
    		// not matching labels
    		[]labels.Set{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 07:18:44 UTC 2024
    - 38.8K bytes
    - Viewed (0)
  4. pilot/pkg/simulation/traffic.go

    		}
    	}
    	// prefix match
    	var bestMatch *route.VirtualHost
    	longest := 0
    	for _, vh := range rc.VirtualHosts {
    		for _, d := range vh.Domains {
    			if d[0] != '*' {
    				continue
    			}
    			if len(host) >= len(d) && strings.HasSuffix(host, d[1:]) && len(d) > longest {
    				bestMatch = vh
    				longest = len(d)
    			}
    		}
    	}
    	if bestMatch != nil {
    		return bestMatch
    	}
    	// Suffix match
    	longest = 0
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/text/language/match.go

    	}
    	if best.conf <= No {
    		if len(want) != 0 {
    			return nil, want[0].tag(), No
    		}
    		return nil, language.Tag{}, No
    	}
    	return best.have, best.want, best.conf
    }
    
    // bestMatch accumulates the best match so far.
    type bestMatch struct {
    	have            *haveTag
    	want            language.Tag
    	conf            Confidence
    	pinnedRegion    language.Region
    	pinLanguage     bool
    	sameRegionGroup bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 25.1K bytes
    - Viewed (0)
  6. src/path/filepath/match_test.go

    	{"a[", "x", false, ErrBadPattern},
    	{"a/b[", "x", false, ErrBadPattern},
    	{"*x", "xxx", true, nil},
    }
    
    func errp(e error) string {
    	if e == nil {
    		return "<nil>"
    	}
    	return e.Error()
    }
    
    func TestMatch(t *testing.T) {
    	for _, tt := range matchTests {
    		pattern := tt.pattern
    		s := tt.s
    		if runtime.GOOS == "windows" {
    			if strings.Contains(pattern, "\\") {
    				// no escape allowed on windows.
    				continue
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:38:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  7. pkg/registry/core/service/storage/storage_test.go

    	storage, _, server := newStorage(t, []api.IPFamily{api.IPv4Protocol})
    	defer server.Terminate(t)
    	defer storage.Store.DestroyFunc()
    	test := genericregistrytest.New(t, storage.Store)
    	test.TestWatch(
    		validService(),
    		// matching labels
    		[]labels.Set{},
    		// not matching labels
    		[]labels.Set{
    			{"foo": "bar"},
    		},
    		// matching fields
    		[]fields.Set{
    			{"metadata.name": "foo"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 440.2K bytes
    - Viewed (0)
  8. src/regexp/all_test.go

    	}
    	// now try bytes
    	m = re.Match([]byte(test.text))
    	if m != (len(test.matches) > 0) {
    		t.Errorf("Match failure on %s: %t should be %t", test, m, len(test.matches) > 0)
    	}
    }
    
    func TestMatch(t *testing.T) {
    	for _, test := range findTests {
    		matchTest(t, &test)
    	}
    }
    
    func matchFunctionTest(t *testing.T, test *FindTest) {
    	m, err := MatchString(test.pat, test.text)
    	if err == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiextensions-apiserver/test/integration/basic_test.go

    	num1 := num["num1"].(int64)
    	num2 := num["num2"].(int64)
    	if num1 != 9223372036854775807 || num2 != 1000000 {
    		t.Errorf("Expected %v, got %v, %v", `9223372036854775807, 1000000`, num1, num2)
    	}
    }
    
    func TestPatch(t *testing.T) {
    	tearDown, apiExtensionClient, dynamicClient, err := fixtures.StartDefaultServerWithClients(t)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer tearDown()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 11:35:33 UTC 2024
    - 33.4K bytes
    - Viewed (0)
Back to top