Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for extractFromURL (0.34 sec)

  1. pkg/kubelet/config/http_test.go

    	}
    }
    
    func TestExtractFromHttpBadness(t *testing.T) {
    	ch := make(chan interface{}, 1)
    	c := sourceURL{"http://localhost:49575/_not_found_", http.Header{}, "other", ch, nil, 0, http.DefaultClient}
    	if err := c.extractFromURL(); err == nil {
    		t.Errorf("Expected error")
    	}
    	expectEmptyChannel(t, ch)
    }
    
    func TestExtractInvalidPods(t *testing.T) {
    	var testCases = []struct {
    		desc string
    		pod  *v1.Pod
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 14 09:38:23 UTC 2022
    - 11.2K bytes
    - Viewed (0)
  2. pkg/kubelet/config/http.go

    		client: &http.Client{Timeout: 10 * time.Second},
    	}
    	klog.V(1).InfoS("Watching URL", "URL", url)
    	go wait.Until(config.run, period, wait.NeverStop)
    }
    
    func (s *sourceURL) run() {
    	if err := s.extractFromURL(); err != nil {
    		// Don't log this multiple times per minute. The first few entries should be
    		// enough to get the point across.
    		if s.failureLogs < 3 {
    			klog.InfoS("Failed to read pods from URL", "err", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 01 07:19:44 UTC 2021
    - 4.1K bytes
    - Viewed (0)
Back to top