Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for NewFakeDiscoveryServer (0.29 sec)

  1. pilot/pkg/xds/debug_test.go

    	v3 "istio.io/istio/pilot/pkg/xds/v3"
    	xdsfake "istio.io/istio/pilot/test/xds"
    )
    
    func TestSyncz(t *testing.T) {
    	t.Run("return the sent and ack status of adsClient connections", func(t *testing.T) {
    		s := xdsfake.NewFakeDiscoveryServer(t, xdsfake.FakeOptions{})
    		ads := s.ConnectADS()
    
    		ads.RequestResponseAck(t, &discovery.DiscoveryRequest{TypeUrl: v3.ClusterType})
    		ads.RequestResponseAck(t, &discovery.DiscoveryRequest{TypeUrl: v3.ListenerType})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. pkg/istio-agent/xds_proxy_delta_test.go

    	"istio.io/istio/pkg/test/util/retry"
    )
    
    // Validates basic xds proxy flow by proxying one CDS requests end to end.
    func TestDeltaXdsProxyBasicFlow(t *testing.T) {
    	proxy := setupXdsProxy(t)
    	f := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{})
    	setDialOptions(proxy, f.BufListener)
    	conn := setupDownstreamConnection(t, proxy)
    	downstream := deltaStream(t, conn)
    	sendDeltaDownstreamWithNode(t, downstream, model.NodeMetadata{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 04:48:02 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  3. pilot/pkg/xds/cds_test.go

    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/slices"
    	"istio.io/istio/pkg/test/util/assert"
    	"istio.io/istio/pkg/util/sets"
    )
    
    func TestCDS(t *testing.T) {
    	s := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{})
    	ads := s.ConnectADS().WithType(v3.ClusterType)
    	ads.RequestResponseAck(t, nil)
    }
    
    func TestSAN(t *testing.T) {
    	labels := map[string]string{"app": "test"}
    	pod := &v1.Pod{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 01 02:06:39 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  4. pilot/pkg/xds/nds_test.go

    						Ips:      []string{"9.9.9.9"},
    						Registry: "External",
    					},
    				},
    			},
    		},
    	}
    	for _, tt := range cases {
    		t.Run(tt.name, func(t *testing.T) {
    			s := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{
    				ConfigString: mustReadFile(t, "./testdata/nds-se.yaml"),
    			})
    
    			ads := s.ConnectADS().WithType(v3.NameTableType)
    			res := ads.RequestResponseAck(t, &discovery.DiscoveryRequest{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 27 16:59:05 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. tests/fuzz/xds_fuzzer.go

    	testing.Init()
    }
    
    func FuzzXds(data []byte) int {
    	t := &testing.T{}
    
    	// Use crd.ParseInputs to verify data
    	_, _, err := crd.ParseInputs(string(data))
    	if err != nil {
    		return 0
    	}
    	s := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{
    		ConfigString: string(data),
    	})
    	proxy := s.SetupProxy(&model.Proxy{
    		ConfigNamespace: "app",
    	})
    	_ = s.Listeners(proxy)
    	_ = s.Routes(proxy)
    	return 1
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  6. pilot/pkg/xds/rds_test.go

    			// ignore it. If we ignore the route, the listeners can get stuck waiting forever.
    			"sidecar_badroute",
    			sidecarID(app3Ip, "app3"),
    			[]string{"ht&p"},
    		},
    	}
    
    	s := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{})
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    			ads := s.ConnectADS().WithType(v3.RouteType).WithID(tt.node)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. pilot/pkg/xds/vm_test.go

    // exercises the full XDS flow.
    func TestRegistration(t *testing.T) {
    	// TODO: allow fake XDS to be "authenticated"
    	test.SetForTest(t, &features.ValidateWorkloadEntryIdentity, false)
    	ds := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{})
    	ds.Store().Create(config.Config{
    		Meta: config.Meta{
    			GroupVersionKind: gvk.WorkloadGroup,
    			Name:             "wg",
    			Namespace:        "namespace",
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  8. pilot/pkg/networking/apigen/apigen_test.go

    )
    
    // Creates an in-process discovery server, using the same code as Istiod, but
    // backed by an in-memory config and endpoint Store.
    func initDS(t *testing.T) *xds.FakeDiscoveryServer {
    	ds := xds.NewFakeDiscoveryServer(t, xds.FakeOptions{})
    	sd := ds.MemRegistry
    	sd.AddHTTPService("fortio1.fortio.svc.cluster.local", "10.10.10.1", 8081)
    	sd.SetEndpoints("fortio1.fortio.svc.cluster.local", "", []*model.IstioEndpoint{
    		{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  9. pilot/pkg/networking/grpcgen/grpcecho_test.go

    	wg := sync.WaitGroup{}
    	var cfgs []config.Config
    
    	discoveryOpts.ListenerBuilder = func() (net.Listener, error) {
    		return net.Listen("tcp", "127.0.0.1:0")
    	}
    	// Start XDS server
    	cgt.ds = xds.NewFakeDiscoveryServer(t, discoveryOpts)
    	_, xdsPorts, _ := net.SplitHostPort(cgt.ds.Listener.Addr().String())
    	xdsPort, _ := strconv.Atoi(xdsPorts)
    	cgt.xdsPort = xdsPort
    	for i, s := range servers {
    		if s.namespace == "" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 12 18:20:36 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top