Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for MockConfig (0.49 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. pkg/test/config/mock_config.proto

    // limitations under the License.
    
    syntax = "proto3";
    
    
    // Basic config resource consisting
    // of a set of key-value pairs
    
    package config;
    
    option go_package = ".;config";
    
    message MockConfig {
      string key = 1;
      repeated ConfigPair pairs = 2;
    }
    
    message ConfigPair {
      string key = 1;
      string value = 2;
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 23 17:19:38 UTC 2022
    - 861 bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. pilot/pkg/leaderelection/k8sleaderelection/k8sresourcelock/configmaplock.go

    	cml.cm = cm
    	return nil
    }
    
    // RecordEvent in leader election while adding meta-data
    func (cml *ConfigMapLock) RecordEvent(s string) {
    	if cml.LockConfig.EventRecorder == nil {
    		return
    	}
    	events := fmt.Sprintf("%v %v", cml.LockConfig.Identity, s)
    	cml.LockConfig.EventRecorder.Eventf(&v1.ConfigMap{ObjectMeta: cml.cm.ObjectMeta}, v1.EventTypeNormal, "LeaderElection", events)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Oct 11 16:58:48 UTC 2021
    - 4K bytes
    - Viewed (0)
  9. pilot/pkg/leaderelection/k8sleaderelection/k8sresourcelock/endpointslock.go

    	}
    	el.e = e
    	return nil
    }
    
    // RecordEvent in leader election while adding meta-data
    func (el *EndpointsLock) RecordEvent(s string) {
    	if el.LockConfig.EventRecorder == nil {
    		return
    	}
    	events := fmt.Sprintf("%v %v", el.LockConfig.Identity, s)
    	el.LockConfig.EventRecorder.Eventf(&v1.Endpoints{ObjectMeta: el.e.ObjectMeta}, v1.EventTypeNormal, "LeaderElection", events)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Oct 11 16:58:48 UTC 2021
    - 3.7K bytes
    - Viewed (0)
  10. pilot/pkg/leaderelection/k8sleaderelection/k8sresourcelock/leaselock.go

    	}
    
    	ll.lease = lease
    	return nil
    }
    
    // RecordEvent in leader election while adding meta-data
    func (ll *LeaseLock) RecordEvent(s string) {
    	if ll.LockConfig.EventRecorder == nil {
    		return
    	}
    	events := fmt.Sprintf("%v %v", ll.LockConfig.Identity, s)
    	ll.LockConfig.EventRecorder.Eventf(&coordinationv1.Lease{ObjectMeta: ll.lease.ObjectMeta}, corev1.EventTypeNormal, "LeaderElection", events)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Jun 04 16:02:26 UTC 2022
    - 4.3K bytes
    - Viewed (0)
Back to top