Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 55 for roundTrip (0.23 sec)

  1. pkg/api/testing/unstructured_test.go

    			if t.Failed() {
    				break
    			}
    		}
    	}
    }
    
    // TestRoundtripToUnstructured verifies the roundtrip faithfulness of all external types from native
    // to unstructured and back using both the JSON and CBOR serializers. The intermediate unstructured
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  2. src/net/http/client.go

    //
    // A RoundTripper must be safe for concurrent use by multiple
    // goroutines.
    type RoundTripper interface {
    	// RoundTrip executes a single HTTP transaction, returning
    	// a Response for the provided Request.
    	//
    	// RoundTrip should not attempt to interpret the response. In
    	// particular, RoundTrip must return err == nil if it obtained
    	// a response, regardless of the response's HTTP status code.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 06:06:11 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  3. src/vendor/golang.org/x/net/nettest/conntest.go

    		t.Errorf("roundtrip SetDeadline error: %v", err)
    	}
    
    	const s = "Hello, world!"
    	buf := []byte(s)
    	if _, err := c.Write(buf); err != nil {
    		t.Errorf("roundtrip Write error: %v", err)
    	}
    	if _, err := io.ReadFull(c, buf); err != nil {
    		t.Errorf("roundtrip Read error: %v", err)
    	}
    	if string(buf) != s {
    		t.Errorf("roundtrip data mismatch: got %q, want %q", buf, s)
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/util/proxy/upgradeaware.go

    	resp, err := rt.upgrader.RoundTrip(req)
    	if err != nil {
    		return nil, err
    	}
    	return resp.Request, nil
    }
    
    // onewayRoundTripper captures the provided request - which is assumed to have
    // been modified by other round trippers - and then returns a fake response.
    type onewayRoundTripper struct{}
    
    // RoundTrip returns a simple 200 OK response that captures the provided request.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 19:10:30 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/util/httpstream/spdy/roundtripper.go

    	auth := username + ":" + password
    	return "Basic " + base64.StdEncoding.EncodeToString([]byte(auth))
    }
    
    // RoundTrip executes the Request and upgrades it. After a successful upgrade,
    // clients may call SpdyRoundTripper.Connection() to retrieve the upgraded
    // connection.
    func (s *SpdyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
    	req = utilnet.CloneRequest(req)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  6. pkg/apis/autoscaling/v2beta2/defaults_test.go

    					},
    				},
    			},
    			test: "test empty array value for Annotations",
    		},
    	}
    
    	for _, test := range tests {
    		hpa := &test.hpa
    		hpaBeforeMuatate := *hpa.DeepCopy()
    		obj := roundTrip(t, runtime.Object(hpa))
    		final_obj, ok := obj.(*autoscalingv2.HorizontalPodAutoscaler)
    		if !ok {
    			t.Fatalf("unexpected object: %v", obj)
    		}
    		if !reflect.DeepEqual(*hpa, hpaBeforeMuatate) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  7. pkg/apis/autoscaling/v2/defaults_test.go

    					},
    				},
    			},
    			test: "test empty array value for Annotations",
    		},
    	}
    
    	for _, test := range tests {
    		hpa := &test.hpa
    		hpaBeforeMuatate := *hpa.DeepCopy()
    		obj := roundTrip(t, runtime.Object(hpa))
    		final_obj, ok := obj.(*autoscalingv2.HorizontalPodAutoscaler)
    		if !ok {
    			t.Fatalf("unexpected object: %v", obj)
    		}
    		if !reflect.DeepEqual(*hpa, hpaBeforeMuatate) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 11.7K bytes
    - Viewed (0)
  8. pkg/apis/batch/v1/defaults_test.go

    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.JobPodReplacementPolicy, test.enablePodReplacementPolicy)
    			original := test.original
    			expected := test.expected
    			obj2 := roundTrip(t, runtime.Object(original))
    			actual, ok := obj2.(*batchv1.Job)
    			if !ok {
    				t.Fatalf("Unexpected object: %v", actual)
    			}
    
    			if diff := cmp.Diff(expected.Spec.Suspend, actual.Spec.Suspend); diff != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 20.8K bytes
    - Viewed (0)
  9. pkg/spiffe/spiffe_test.go

    				t.Fatal(err)
    			}
    			if !reflect.DeepEqual(got, *tt.expected) {
    				t.Fatalf("expected %#v, got %#v", *tt.expected, got)
    			}
    
    			roundTrip := got.String()
    			if roundTrip != tt.input {
    				t.Fatalf("round trip failed, expected %q got %q", tt.input, roundTrip)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 18.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/util/net/http_test.go

    			agent := tt.agent
    			if len(agent) == 0 {
    				agent = "-"
    			}
    			expect := WarningHeader{Code: tt.code, Agent: agent, Text: tt.text}
    			if roundTrip != expect {
    				t.Fatalf("after round trip, want:\n%#v\ngot\n%#v", expect, roundTrip)
    			}
    		})
    	}
    }
    
    func TestParseWarningHeaders(t *testing.T) {
    	tests := []struct {
    		name string
    
    		headers []string
    
    		want     []WarningHeader
    		wantErrs []string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 18 01:21:56 UTC 2023
    - 24.5K bytes
    - Viewed (0)
Back to top