Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for emptyObj (0.2 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/testing/testfieldmanager.go

    	apiVersion   string
    	emptyObj     runtime.Object
    	liveObj      runtime.Object
    }
    
    // APIVersion of the object that we're tracking.
    func (f *TestFieldManagerImpl) APIVersion() string {
    	return f.apiVersion
    }
    
    // Reset resets the state of the liveObject by resetting it to an empty object.
    func (f *TestFieldManagerImpl) Reset() {
    	f.liveObj = f.emptyObj.DeepCopyObject()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 16 20:03:48 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/compatibility.go

    		}
    		return
    	}
    
    	emptyObj, err := c.Scheme.New(gvk)
    	if err != nil {
    		t.Fatal(err)
    	}
    	{
    		// compact before decoding since embedded RawExtension fields retain indenting
    		compacted := &bytes.Buffer{}
    		if err := gojson.Compact(compacted, actualJSON); err != nil {
    			t.Error(err)
    		}
    
    		jsonDecoded := emptyObj.DeepCopyObject()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 16:38:32 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/skipnonapplied.go

    	if len(managed.Fields()) == 0 {
    		gvk := appliedObj.GetObjectKind().GroupVersionKind()
    		emptyObj, err := f.objectCreater.New(gvk)
    		if err != nil {
    			return nil, nil, fmt.Errorf("failed to create empty object of type %v: %v", gvk, err)
    		}
    		liveObj, managed, err = f.fieldManager.Update(emptyObj, liveObj, managed, f.beforeApplyManagerName)
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 16 20:03:48 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  4. src/syscall/js/js_test.go

    	}
    }
    
    func TestEqual(t *testing.T) {
    	if !dummys.Get("someFloat").Equal(dummys.Get("someFloat")) {
    		t.Errorf("same float is not equal")
    	}
    	if !dummys.Get("emptyObj").Equal(dummys.Get("emptyObj")) {
    		t.Errorf("same object is not equal")
    	}
    	if dummys.Get("someFloat").Equal(dummys.Get("someInt")) {
    		t.Errorf("different values are not unequal")
    	}
    }
    
    func TestNaN(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 14:35:26 UTC 2024
    - 17.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/runtime/scheme_test.go

    		emptyObj := &runtimetesting.Unstructured{Object: make(map[string]interface{})}
    		if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingKind(err) {
    			t.Errorf("unexpected error: %v", err)
    		}
    		emptyObj.SetGroupVersionKind(schema.GroupVersionKind{Kind: "Test"})
    		if _, _, err := scheme.ObjectKinds(emptyObj); !runtime.IsMissingVersion(err) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  6. pkg/config/resource/instance_test.go

    // limitations under the License.
    
    package resource
    
    import (
    	"testing"
    
    	. "github.com/onsi/gomega"
    	"google.golang.org/protobuf/types/known/emptypb"
    )
    
    func TestInstance_IsEmpty_False(t *testing.T) {
    	g := NewWithT(t)
    
    	e := Instance{
    		Message: &emptypb.Empty{},
    	}
    
    	g.Expect(e.IsEmpty()).To(BeFalse())
    }
    
    func TestInstance_IsEmpty_True(t *testing.T) {
    	g := NewWithT(t)
    	e := Instance{}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  7. pkg/config/analysis/local/helpers_test.go

    // limitations under the License.
    package local
    
    // Test helpers common to this package
    
    import (
    	"reflect"
    	"testing"
    
    	"google.golang.org/protobuf/types/known/emptypb"
    	"google.golang.org/protobuf/types/known/structpb"
    
    	"istio.io/istio/pkg/config/analysis/legacy/source/kube"
    	"istio.io/istio/pkg/config/resource"
    	r2 "istio.io/istio/pkg/config/schema/resource"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 02 17:36:47 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  8. pilot/pkg/security/authn/policy_applier_test.go

    	"github.com/google/go-cmp/cmp"
    	"google.golang.org/protobuf/proto"
    	"google.golang.org/protobuf/testing/protocmp"
    	"google.golang.org/protobuf/types/known/durationpb"
    	"google.golang.org/protobuf/types/known/emptypb"
    
    	authn_alpha "istio.io/api/authentication/v1alpha1"
    	authn_filter "istio.io/api/envoy/config/filter/http/authn/v2alpha1"
    	"istio.io/api/security/v1beta1"
    	type_beta "istio.io/api/type/v1beta1"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Dec 01 07:32:22 UTC 2023
    - 60.2K bytes
    - Viewed (0)
  9. istioctl/pkg/util/configdump/wrapper.go

    	exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
    	"google.golang.org/protobuf/reflect/protoreflect"
    	"google.golang.org/protobuf/reflect/protoregistry"
    	"google.golang.org/protobuf/types/known/emptypb"
    
    	"istio.io/istio/pkg/util/protomarshal"
    )
    
    type resolver struct {
    	*protoregistry.Types
    }
    
    var nonStrictResolver = &resolver{protoregistry.GlobalTypes}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  10. pkg/config/schema/resource/schema_test.go

    	s := Builder{
    		Kind:         "Empty",
    		Plural:       "Empties",
    		ProtoPackage: "google.golang.org/protobuf/types/known/emptypb",
    		Proto:        "google.protobuf.Empty",
    	}.MustBuild()
    
    	p, err := s.NewInstance()
    	assert.NoError(t, err)
    	assert.Equal(t, p, config.Spec(&emptypb.Empty{}))
    }
    
    func TestMustNewProtoInstance_Panic_Nil(t *testing.T) {
    	g := NewWithT(t)
    	defer func() {
    		r := recover()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 5.2K bytes
    - Viewed (0)
Back to top