Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IgnoreUnset (0.11 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/diff/diff.go

    			b = linesB[i]
    		}
    		fmt.Fprintf(w, "%s\t%s\n", a, b)
    	}
    	w.Flush()
    	return buf.String()
    }
    
    // IgnoreUnset is an option that ignores fields that are unset on the right
    // hand side of a comparison. This is useful in testing to assert that an
    // object is a derivative.
    func IgnoreUnset() cmp.Option {
    	return cmp.Options{
    		// ignore unset fields in v2
    		cmp.FilterPath(func(path cmp.Path) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:45:31 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  2. pkg/controller/certificates/signer/signer_test.go

    		PublicKeyAlgorithm:    x509.ECDSA,
    		SignatureAlgorithm:    x509.SHA256WithRSA,
    		MaxPathLen:            -1,
    	}
    
    	if !cmp.Equal(*certs[0], want, diff.IgnoreUnset()) {
    		t.Errorf("unexpected diff: %v", cmp.Diff(certs[0], want, diff.IgnoreUnset()))
    	}
    }
    
    func TestHandle(t *testing.T) {
    	cases := []struct {
    		name string
    		// parameters to be set on the generated CSR
    		commonName string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 02 21:12:04 UTC 2022
    - 15K bytes
    - Viewed (0)
  3. pkg/controller/certificates/authority/authority_test.go

    			}
    
    			opts := cmp.Options{
    				cmpopts.IgnoreFields(x509.Certificate{},
    					"SignatureAlgorithm",
    					"PublicKeyAlgorithm",
    					"Version",
    					"MaxPathLen",
    				),
    				diff.IgnoreUnset(),
    				cmp.Transformer("RoundTime", func(x time.Time) time.Time {
    					return x.Truncate(time.Second)
    				}),
    				cmp.Comparer(func(x, y *url.URL) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 23 19:36:11 UTC 2021
    - 7.3K bytes
    - Viewed (0)
Back to top