Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for MockConfig (0.51 sec)

  1. pkg/test/config/mock_config.pb.go

    		}
    		return ms
    	}
    	return mi.MessageOf(x)
    }
    
    // Deprecated: Use MockConfig.ProtoReflect.Descriptor instead.
    func (*MockConfig) Descriptor() ([]byte, []int) {
    	return file_pkg_test_config_mock_config_proto_rawDescGZIP(), []int{0}
    }
    
    func (x *MockConfig) GetKey() string {
    	if x != nil {
    		return x.Key
    	}
    	return ""
    }
    
    func (x *MockConfig) GetPairs() []*ConfigPair {
    	if x != nil {
    		return x.Pairs
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 03 17:06:22 UTC 2022
    - 7.6K bytes
    - Viewed (0)
  2. pkg/config/schema/collections/mock.go

    	Mock = resource.Builder{
    		ClusterScoped: false,
    		Kind:          "MockConfig",
    		Plural:        "mockconfigs",
    		Group:         "test.istio.io",
    		Version:       "v1",
    		Proto:         "config.MockConfig",
    		ProtoPackage:  "istio.io/istio/pkg/test/config",
    		ValidateProto: func(cfg config.Config) (validation.Warning, error) {
    			if cfg.Spec.(*testconfig.MockConfig).Key == "" {
    				return nil, errors.New("empty key")
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  3. pkg/config/model_test.go

    			func(c Spec) Spec {
    				c.(*k8s.GatewayClassSpec).ControllerName = "bar"
    				return c
    			},
    			nil,
    		},
    		// mock type
    		{
    			&config.MockConfig{Key: "foobar"},
    			func(c Spec) Spec {
    				c.(*config.MockConfig).Key = "bar"
    				return c
    			},
    			protocmp.Transform(),
    		},
    		// XDS type, to test golang/proto
    		{
    			&cluster.Cluster{Name: "foobar"},
    			func(c Spec) Spec {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 17:37:32 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. pilot/test/mock/config.go

    			Name:             "invalid",
    			ResourceVersion:  revs[0],
    		},
    		Spec: &config.MockConfig{},
    	}
    
    	missing := config2.Config{
    		Meta: config2.Meta{
    			GroupVersionKind: mockGvk,
    			Name:             "missing",
    			ResourceVersion:  revs[0],
    		},
    		Spec: &config.MockConfig{Key: "missing"},
    	}
    
    	if _, err := r.Create(config2.Config{}); err == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  5. pkg/webhooks/validation/server/server_test.go

    	un.SetGroupVersionKind(r.GroupVersionKind().Kubernetes())
    	un.SetName(name)
    	un.SetLabels(map[string]string{"key": name})
    	un.SetAnnotations(map[string]string{"annotationKey": name})
    	un.Object["spec"] = &config.MockConfig{
    		Key: key,
    		Pairs: []*config.ConfigPair{{
    			Key:   key,
    			Value: strconv.Itoa(i),
    		}},
    	}
    	raw, err := json.Marshal(&un)
    	if err != nil {
    		t.Fatalf("Marshal(%v) failed: %v", name, err)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  6. pilot/pkg/model/config_test.go

    			t.Errorf("Failed: got eq=%v want=%v for %q ?= %q", got, c.want, c.a, c.b)
    		}
    	}
    }
    
    func TestConfigKey(t *testing.T) {
    	cfg := mock_config.Make("ns", 2)
    	want := "test.istio.io/v1/MockConfig/ns/mock-config2"
    	if key := cfg.Meta.Key(); key != want {
    		t.Fatalf("config.Key() => got %q, want %q", key, want)
    	}
    }
    
    func TestResolveShortnameToFQDN(t *testing.T) {
    	tests := []struct {
    		name string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 20 12:54:10 UTC 2023
    - 19K bytes
    - Viewed (0)
  7. pilot/pkg/leaderelection/k8sleaderelection/k8sresourcelock/interface.go

    		EndpointsMeta: metav1.ObjectMeta{
    			Namespace: ns,
    			Name:      name,
    		},
    		Client:     coreClient,
    		LockConfig: rlc,
    	}
    	configmapLock := &ConfigMapLock{
    		ConfigMapMeta: metav1.ObjectMeta{
    			Namespace: ns,
    			Name:      name,
    		},
    		Client:     coreClient,
    		LockConfig: rlc,
    	}
    	leaseLock := &LeaseLock{
    		LeaseMeta: metav1.ObjectMeta{
    			Namespace: ns,
    			Name:      name,
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 6K bytes
    - Viewed (0)
  8. pilot/pkg/leaderelection/k8sleaderelection/leaderelection_test.go

    					EndpointsMeta: objectMeta,
    					LockConfig:    resourceLockConfig,
    					Client:        c.CoreV1(),
    				}
    			case "configmaps":
    				lock = &rl.ConfigMapLock{
    					ConfigMapMeta: objectMeta,
    					LockConfig:    resourceLockConfig,
    					Client:        c.CoreV1(),
    				}
    			case "leases":
    				lock = &rl.LeaseLock{
    					LeaseMeta:  objectMeta,
    					LockConfig: resourceLockConfig,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 23 16:39:43 UTC 2023
    - 42.5K bytes
    - Viewed (0)
  9. pilot/pkg/leaderelection/leaderelection.go

    	}
    	var lock k8sresourcelock.Interface = &k8sresourcelock.ConfigMapLock{
    		ConfigMapMeta: metav1.ObjectMeta{Namespace: l.namespace, Name: l.electionID},
    		Client:        l.client.CoreV1(),
    		LockConfig: k8sresourcelock.ResourceLockConfig{
    			Identity: l.name,
    			Key:      key,
    		},
    	}
    	if l.perRevision {
    		lock = &k8sresourcelock.LeaseLock{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 16:44:32 UTC 2024
    - 9.7K bytes
    - Viewed (0)
Back to top