Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 65 for parseCert (0.12 sec)

  1. tests/integration/ambient/cacert_rotation_test.go

    		t.Errorf("failed to read %s file: %v", caCertFile, err)
    	}
    	return parseCert(t, certBytes)
    }
    
    func parseCert(t framework.TestContext, certBytes []byte) *x509.Certificate {
    	parsedCert, err := util.ParsePemEncodedCertificate(certBytes)
    	if err != nil {
    		t.Errorf("failed to parse certificate pem file: %v", err)
    	}
    	return parsedCert
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 03:28:36 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  2. pilot/pkg/model/context_test.go

    		t.Errorf("ParsePort(127.0.0.1) => Got %d, want 0", port)
    	}
    	if port := model.ParsePort("[::1]:3000"); port != 3000 {
    		t.Errorf("ParsePort([::1]:3000) => Got %d, want 3000", port)
    	}
    	if port := model.ParsePort("::1"); port != 0 {
    		t.Errorf("ParsePort(::1) => Got %d, want 0", port)
    	}
    	if port := model.ParsePort("[2001:4860:0:2001::68]:3000"); port != 3000 {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 05 23:51:52 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/endpoint.go

    }
    
    // ParsePort parses a string representing a TCP port.
    // If the string is not a valid representation of a TCP port, ParsePort returns an error.
    func ParsePort(port string) (int, error) {
    	portInt, err := netutils.ParsePort(port, true)
    	if err == nil && (1 <= portInt && portInt <= 65535) {
    		return portInt, nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jan 11 15:08:59 UTC 2022
    - 5.3K bytes
    - Viewed (0)
  4. src/log/slog/slogtest_test.go

    	}
    	return m, nil
    }
    
    // parseText parses the output of a single call to TextHandler.Handle.
    // It can parse the output of the tests in this package,
    // but it doesn't handle quoted keys or values.
    // It doesn't need to handle all cases, because slogtest deliberately
    // uses simple inputs so handler writers can focus on testing
    // handler behavior, not parsing.
    func parseText(bs []byte) (map[string]any, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:50:22 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  5. src/net/port_test.go

    }
    
    func TestParsePort(t *testing.T) {
    	// The following test cases are cribbed from the strconv
    	for _, tt := range parsePortTests {
    		if port, needsLookup := parsePort(tt.service); port != tt.port || needsLookup != tt.needsLookup {
    			t.Errorf("parsePort(%q) = %d, %t; want %d, %t", tt.service, port, needsLookup, tt.port, tt.needsLookup)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 15 23:11:47 UTC 2016
    - 1.3K bytes
    - Viewed (0)
  6. src/internal/syscall/unix/kernel_version_solaris.go

    		// whether the kernel is Solaris or illumos.
    		ver = un.Release[:]
    	}
    
    	parseNext := func() (n int) {
    		for i, c := range ver {
    			if c == '.' {
    				ver = ver[i+1:]
    				return
    			}
    			if '0' <= c && c <= '9' {
    				n = n*10 + int(c-'0')
    			}
    		}
    		ver = nil
    		return
    	}
    
    	major = parseNext()
    	minor = parseNext()
    
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  7. src/net/port.go

    // Copyright 2016 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package net
    
    // parsePort parses service as a decimal integer and returns the
    // corresponding value as port. It is the caller's responsibility to
    // parse service as a non-decimal integer when needsLookup is true.
    //
    // Some system resolvers will return a valid port number when given a number
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:31:56 UTC 2017
    - 1.5K bytes
    - Viewed (0)
  8. platforms/ide/ide/src/test/groovy/org/gradle/plugins/ide/eclipse/model/FacetTest.groovy

        def canReadFromXml() {
            when:
            Facet facet = new Facet(new XmlParser().parseText(XML_TEXT))
    
            then:
            facet == createFacet()
        }
    
        def canReadFixedFromXml() {
            when:
            Facet facet = new Facet(new XmlParser().parseText(FIXED_XML_TEXT))
    
            then:
            facet == createFixedFacet()
        }
    
        def canWriteToXml() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:12 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  9. pkg/kube/inject/validate.go

    	return validatePortList("excludeOutboundPorts", ports)
    }
    
    // validateStatusPort validates the statusPort parameter
    func validateStatusPort(port string) error {
    	if _, e := parsePort(port); e != nil {
    		return fmt.Errorf("excludeInboundPorts invalid: %v", e)
    	}
    	return nil
    }
    
    // validateUInt32 validates that the given annotation value is a positive integer.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. testing/internal-performance-testing/src/test/groovy/org/gradle/performance/results/TestDataGeneratorTest.groovy

        def "can generate cross version json data"() {
            when:
            generator.render(mockCrossVersionHistory(), writer)
    
            then:
            assert new JsonSlurper().parseText(writer.toString()) == [
                executionLabels: [
                    [
                        id: '1450575490',
                        branch: 'master',
                        date: '1970-01-01',
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 4.8K bytes
    - Viewed (0)
Back to top