Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NewFakeStore (0.18 sec)

  1. pilot/pkg/model/fake_store.go

    	"istio.io/istio/pkg/config/schema/collections"
    	"istio.io/istio/pkg/maps"
    )
    
    type FakeStore struct {
    	store map[config.GroupVersionKind]map[string]map[string]config.Config
    }
    
    func NewFakeStore() *FakeStore {
    	f := FakeStore{
    		store: make(map[config.GroupVersionKind]map[string]map[string]config.Config),
    	}
    	return &f
    }
    
    var _ ConfigStore = (*FakeStore)(nil)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jul 18 06:50:06 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. pilot/pkg/model/push_context_test.go

    			}
    		})
    	}
    }
    
    func TestEnvoyFilterOrder(t *testing.T) {
    	env := &Environment{}
    	store := NewFakeStore()
    
    	ctime := time.Now()
    
    	envoyFilters := []config.Config{
    		{
    			Meta: config.Meta{Name: "default-priority", Namespace: "testns-1", GroupVersionKind: gvk.EnvoyFilter},
    			Spec: &networking.EnvoyFilter{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 95.3K bytes
    - Viewed (0)
  3. tests/fuzz/pilot_model_fuzzer.go

    	if err != nil {
    		return 0
    	}
    	m, err := mesh.ApplyMeshConfigDefaults(configString)
    	if err != nil {
    		return 0
    	}
    
    	env := &model.Environment{}
    	store := model.NewFakeStore()
    
    	env.ConfigStore = store
    	sd := memory.NewServiceDiscovery(services...)
    	sd.WantGetProxyServiceTargets = slices.Map(serviceInstances, model.ServiceInstanceToTarget)
    	env.ServiceDiscovery = sd
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 18:13:06 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  4. pkg/config/analysis/local/analyze_test.go

    	g.Expect(result.Messages).To(ConsistOf(msg1))
    }
    
    func TestAddInMemorySource(t *testing.T) {
    	g := NewWithT(t)
    
    	sa := NewSourceAnalyzer(blankCombinedAnalyzer, "", "", nil)
    
    	src := model.NewFakeStore()
    	sa.AddSource(dfCache{ConfigStore: src})
    	assert.Equal(t, sa.meshCfg, mesh.DefaultMeshConfig()) // Base default meshcfg
    	g.Expect(sa.meshNetworks.Networks).To(HaveLen(0))
    	g.Expect(sa.stores).To(HaveLen(1))
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 09 07:43:43 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  5. pilot/pkg/model/proxy_config_test.go

    			Name:             name,
    			Namespace:        ns,
    		},
    		Spec: spec,
    	}
    }
    
    func newProxyConfigStore(t *testing.T, configs []config.Config) ConfigStore {
    	t.Helper()
    
    	store := NewFakeStore()
    	for _, cfg := range configs {
    		store.Create(cfg)
    	}
    
    	return store
    }
    
    func setCreationTimestamp(c config.Config, t time.Time) config.Config {
    	c.Meta.CreationTimestamp = t
    	return c
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 21 01:23:19 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  6. pilot/pkg/config/kube/gateway/deploymentcontroller_test.go

    			Name: "custom",
    		},
    		Spec: k8s.GatewayClassSpec{
    			ControllerName: k8s.GatewayController(features.ManagedGatewayController),
    		},
    	}
    	defaultObjects := []runtime.Object{defaultNamespace}
    	store := model.NewFakeStore()
    	if _, err := store.Create(config.Config{
    		Meta: config.Meta{
    			GroupVersionKind: gvk.ProxyConfig,
    			Name:             "test",
    			Namespace:        "default",
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 21:43:20 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  7. pilot/pkg/model/authentication_test.go

    			}
    		})
    	}
    }
    
    func getTestAuthenticationPolicies(configs []*config.Config, t *testing.T) *AuthenticationPolicies {
    	configStore := NewFakeStore()
    	for _, cfg := range configs {
    		log.Infof("add config %s", cfg.Name)
    		if _, err := configStore.Create(*cfg); err != nil {
    			t.Fatalf("getTestAuthenticationPolicies %v", err)
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 22:20:44 UTC 2024
    - 45.1K bytes
    - Viewed (0)
  8. pkg/kube/inject/webhook_test.go

    		t.Fatalf("WriteFile(%v) failed: %v", valuesFile, err)
    	}
    
    	// mesh config
    	m := mesh.DefaultMeshConfig()
    	store := model.NewFakeStore()
    	for i := 0; i < pcResources; i++ {
    		store.Create(newProxyConfig(fmt.Sprintf("pc-%d", i), "istio-system", &v1beta12.ProxyConfig{
    			Concurrency: &wrapperspb.Int32Value{Value: int32(i % 5)},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 17 20:25:52 UTC 2023
    - 39K bytes
    - Viewed (1)
Back to top