Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 31 for TestRoundTrip (0.32 sec)

  1. pkg/apis/apiserverinternal/install/roundtrip_test.go

    limitations under the License.
    */
    
    package install
    
    import (
    	"testing"
    
    	"k8s.io/apimachinery/pkg/api/apitesting/roundtrip"
    	"k8s.io/kubernetes/pkg/apis/apiserverinternal/fuzzer"
    )
    
    func TestRoundTrip(t *testing.T) {
    	roundtrip.RoundTripTestForAPIGroup(t, Install, fuzzer.Funcs)
    	roundtrip.RoundTripProtobufTestForAPIGroup(t, Install, fuzzer.Funcs)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 08 21:34:55 UTC 2020
    - 888 bytes
    - Viewed (0)
  2. cmd/kubelet/app/options/options_test.go

    	s, err := NewKubeletServer()
    	if err != nil {
    		panic(err)
    	}
    	return s
    }
    
    // TestRoundTrip ensures that flag values from the Kubelet can be serialized
    // to arguments and then read back and have the same value. Also catches cases
    // where the default value reported by the flag is not actually allowed to be
    // specified.
    func TestRoundTrip(t *testing.T) {
    	testCases := []struct {
    		name          string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  3. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackRoundTripTest.kt

      }
    
      private val bytesOut = Buffer()
      private val hpackWriter = Hpack.Writer(out = bytesOut)
    
      @ParameterizedTest
      @ArgumentsSource(StoriesTestProvider::class)
      fun testRoundTrip(story: Story) {
        assumeFalse(
          story === Story.MISSING,
          "Test stories missing, checkout git submodule",
        )
    
        val newCases = mutableListOf<Case>()
        for (case in story.cases) {
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/roundtrip_test.go

    	"testing"
    	"time"
    
    	"github.com/fxamacker/cbor/v2"
    	"github.com/google/go-cmp/cmp"
    )
    
    func nilPointerFor[T interface{}]() *T {
    	return nil
    }
    
    // TestRoundtrip roundtrips object serialization to interface{} and back via CBOR.
    func TestRoundtrip(t *testing.T) {
    	type modePair struct {
    		enc cbor.EncMode
    		dec cbor.DecMode
    	}
    
    	for _, tc := range []struct {
    		name      string
    		modePairs []modePair
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 21:48:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/plugin/pkg/authorizer/webhook/round_trip_test.go

    	"testing"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	fuzz "github.com/google/gofuzz"
    
    	authorizationv1 "k8s.io/api/authorization/v1"
    	authorizationv1beta1 "k8s.io/api/authorization/v1beta1"
    )
    
    func TestRoundTrip(t *testing.T) {
    	f := fuzz.New()
    	seed := time.Now().UnixNano()
    	t.Logf("seed = %v", seed)
    	f.RandSource(rand.New(rand.NewSource(seed)))
    
    	for i := 0; i < 1000; i++ {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/plugin/pkg/authenticator/token/webhook/round_trip_test.go

    	"testing"
    	"time"
    
    	"github.com/google/go-cmp/cmp"
    	fuzz "github.com/google/gofuzz"
    
    	authenticationv1 "k8s.io/api/authentication/v1"
    	authenticationv1beta1 "k8s.io/api/authentication/v1beta1"
    )
    
    func TestRoundTrip(t *testing.T) {
    	f := fuzz.New()
    	seed := time.Now().UnixNano()
    	t.Logf("seed = %v", seed)
    	f.RandSource(rand.New(rand.NewSource(seed)))
    
    	for i := 0; i < 1000; i++ {
    		original := &authenticationv1.TokenReview{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:48:03 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  7. src/compress/gzip/gzip_test.go

    	}
    	if len(b) != 0 {
    		t.Fatalf("got %d bytes, want 0", len(b))
    	}
    	if err := r.Close(); err != nil {
    		t.Fatalf("Reader.Close: %v", err)
    	}
    }
    
    // TestRoundTrip tests that gzipping and then gunzipping is the identity
    // function.
    func TestRoundTrip(t *testing.T) {
    	buf := new(bytes.Buffer)
    
    	w := NewWriter(buf)
    	w.Comment = "comment"
    	w.Extra = []byte("extra")
    	w.ModTime = time.Unix(1e8, 0)
    	w.Name = "name"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 17:10:06 UTC 2024
    - 6K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/util/arguments_test.go

    			actual := ArgumentsFromCommand(rt.args)
    			if !reflect.DeepEqual(actual, rt.expected) {
    				t.Errorf("failed ArgumentsFromCommand:\nexpected:\n%v\nsaw:\n%v", rt.expected, actual)
    			}
    		})
    	}
    }
    
    func TestRoundtrip(t *testing.T) {
    	var tests = []struct {
    		name string
    		args []string
    	}{
    		{
    			name: "normal case",
    			args: []string{
    				"--admission-control=NamespaceLifecycle,LimitRanger",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 16 10:27:05 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/value/encrypt/secretbox/secretbox_test.go

    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		_, err := p.TransformToStorage(ctx, v, dataCtx)
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    	b.StopTimer()
    }
    
    func TestRoundTrip(t *testing.T) {
    	lengths := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 128, 1024}
    
    	ctx := context.Background()
    	tests := []struct {
    		name    string
    		dataCtx value.Context
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 17 16:31:31 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  10. src/mime/quotedprintable/writer_test.go

    			t.Errorf("Close(): %v", err)
    			continue
    		}
    		got := buf.String()
    		if got != want {
    			t.Errorf("Write(%q), got:\n%q\nwant:\n%q", tt.in, got, want)
    		}
    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	buf := new(bytes.Buffer)
    	w := NewWriter(buf)
    	if _, err := w.Write(testMsg); err != nil {
    		t.Fatalf("Write: %v", err)
    	}
    	if err := w.Close(); err != nil {
    		t.Fatalf("Close: %v", err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 17:36:47 UTC 2022
    - 5.1K bytes
    - Viewed (0)
Back to top