Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for wantCode (0.16 sec)

  1. src/internal/dag/alg_test.go

    	//
    	// "c" and "b" could be in either order, but Topo is
    	// deterministic in reverse node definition order.
    	//
    	// "a" is a leaf.
    	wantNodes := strings.Fields("d c b a")
    	if !reflect.DeepEqual(wantNodes, got) {
    		t.Fatalf("want topo sort %v, got %v", wantNodes, got)
    	}
    }
    
    func TestTransitiveReduction(t *testing.T) {
    	t.Run("diamond", func(t *testing.T) {
    		g := mustParse(t, diamond)
    		g.TransitiveReduction()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 04 15:31:44 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  2. pilot/pkg/request/command_test.go

    	wantMethod string
    	wantPath   string
    	wantBody   []byte
    	StatusCode int
    	Response   string
    }
    
    func (p *pilotStubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    	p.Lock()
    	if r.Method == p.States[0].wantMethod {
    		if r.URL.Path == p.States[0].wantPath {
    			defer r.Body.Close()
    			body, _ := io.ReadAll(r.Body)
    			if err := util.Compare(body, p.States[0].wantBody); err == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:11:01 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  3. src/internal/dag/parse_test.go

    			}
    		}
    	}
    }
    
    func TestParse(t *testing.T) {
    	// Basic smoke test for graph parsing.
    	g := mustParse(t, diamond)
    
    	wantNodes := strings.Fields("a b c d")
    	if !reflect.DeepEqual(wantNodes, g.Nodes) {
    		t.Fatalf("want nodes %v, got %v", wantNodes, g.Nodes)
    	}
    
    	// Parse returns the transitive closure, so it adds d->a.
    	wantEdges(t, g, "b->a c->a d->a d->b d->c")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 04 15:31:42 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  4. src/net/http/transport_dial_test.go

    	dt := newTransportDialTester(t, http1Mode)
    
    	// First request creates a new connection.
    	rt1 := dt.roundTrip()
    	c1 := dt.wantDial()
    	c1.finish(nil)
    	rt1.wantDone(c1)
    	rt1.finish()
    
    	// Second request reuses the first connection.
    	rt2 := dt.roundTrip()
    	rt2.wantDone(c1)
    	rt2.finish()
    }
    
    func TestTransportPoolConnCannotReuseConnectionInUse(t *testing.T) {
    	dt := newTransportDialTester(t, http1Mode)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  5. src/net/http/httptest/httptest_test.go

    			slurp, err := io.ReadAll(got.Body)
    			if err != nil {
    				t.Errorf("ReadAll: %v", err)
    			}
    			if string(slurp) != tt.wantBody {
    				t.Errorf("Body = %q; want %q", slurp, tt.wantBody)
    			}
    			tt.want = tt.want.WithContext(context.Background())
    			got.Body = nil // before DeepEqual
    			if !reflect.DeepEqual(got.URL, tt.want.URL) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 18:09:14 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. cni/pkg/repair/repair_test.go

    			}
    		})
    	}
    }
    
    func TestDeletePods(t *testing.T) {
    	tests := []struct {
    		name      string
    		client    kube.Client
    		config    config.RepairConfig
    		wantErr   bool
    		wantPods  []*corev1.Pod
    		wantCount float64
    		wantTags  map[string]string
    	}{
    		{
    			name:   "No broken pods",
    			client: fakeClient(workingPod, workingPodDiedPreviously),
    			config: config.RepairConfig{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 24 03:31:28 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  7. src/cmd/go/internal/load/pkg_test.go

    			pkg.ImportPath = tt.in
    			pkg.GoFiles = tt.files
    			pkg.Internal.CmdlineFiles = len(tt.files) > 0
    			gotMod := pkg.DefaultExecName()
    			if gotMod != tt.wantMod {
    				t.Errorf("pkg.DefaultExecName with ImportPath = %q in module mode = %v; want %v", tt.in, gotMod, tt.wantMod)
    			}
    		}
    		{
    			cfg.ModulesEnabled = false
    			pkg := new(Package)
    			pkg.ImportPath = tt.in
    			pkg.GoFiles = tt.files
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 09 14:05:53 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  8. pkg/registry/core/pod/strategy_test.go

    				t.Errorf("Unexpected error: %v", errs.ToAggregate())
    			}
    
    			Strategy.PrepareForCreate(genericapirequest.NewContext(), pod)
    			wantPod.Spec.TopologySpreadConstraints = append(wantPod.Spec.TopologySpreadConstraints, tc.wantTopologySpreadConstraints...)
    			if diff := cmp.Diff(wantPod, pod, cmpopts.IgnoreFields(pod.Status, "Phase", "QOSClass")); diff != "" {
    				t.Errorf("%s unexpected result (-want, +got): %s", tc.name, diff)
    			}
    		})
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  9. pkg/api/pod/util_test.go

    		newPod      *api.Pod
    		wantPod     *api.Pod
    	}{
    		{
    			description: "old with claims / new with claims / disabled",
    			oldPod:      podWithClaims,
    			newPod:      podWithClaims,
    			wantPod:     podWithClaims,
    		},
    		{
    			description: "old without claims / new with claims / disabled",
    			oldPod:      podWithoutClaims,
    			newPod:      podWithClaims,
    			wantPod:     podWithoutClaims,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 108.8K bytes
    - Viewed (0)
  10. pkg/registry/storage/csidriver/strategy_test.go

    	tests := []struct {
    		name                                string
    		old, update                         *storage.CSIDriver
    		seLinuxMountReadWriteOncePodEnabled bool
    		wantCapacity                        *bool
    		wantModes                           []storage.VolumeLifecycleMode
    		wantTokenRequests                   []storage.TokenRequest
    		wantRequiresRepublish               *bool
    		wantGeneration                      int64
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 16.7K bytes
    - Viewed (0)
Back to top