Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for CheckErr (0.59 sec)

  1. tests/integration/operator/uninstall_test.go

    				if err := deleteIop(cs, iopName); err != nil {
    					t.Errorf("failed to delete iopfile: %v", err)
    				}
    
    				retry.UntilSuccessOrFail(t, func() error {
    					exist, checkErr := checkIopExist(cs, iopName)
    					if checkErr != nil {
    						return checkErr
    					}
    
    					if exist {
    						return fmt.Errorf("fail to delete iop")
    					}
    
    					return nil
    				}, retry.Timeout(deletionTimeout), retry.Delay(retryDelay))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 10 20:33:28 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/error.go

    		}
    
    		fmt.Fprint(os.Stderr, msg)
    	}
    	os.Exit(code)
    }
    
    // CheckErr prints a user friendly error to STDERR and exits with a non-zero
    // exit code. Unrecognized errors will be printed with an "error: " prefix.
    //
    // This method is generic to the command in use and may be used by non-Kubectl
    // commands.
    func CheckErr(err error) {
    	checkErr(err, fatal)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 25 16:35:10 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. pkg/scheduler/profile/profile_test.go

    		t.Run(tc.name, func(t *testing.T) {
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			m, err := NewMap(ctx, tc.cfgs, fakeRegistry, nilRecorderFactory)
    			if err := checkErr(err, tc.wantErr); err != nil {
    				t.Fatal(err)
    			}
    			if len(tc.wantErr) != 0 {
    				return
    			}
    			if len(m) != len(tc.cfgs) {
    				t.Errorf("got %d profiles, want %d", len(m), len(tc.cfgs))
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 20 09:49:54 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  4. src/net/http/response_test.go

    		for i := 0; i < 1000; i++ {
    			if test.compressed {
    				// Otherwise this compresses too well.
    				_, err := io.ReadFull(rand.Reader, chunk)
    				checkErr(err, "rand.Reader ReadFull")
    			}
    			wr.Write(chunk)
    		}
    		if test.compressed {
    			err := wr.(*gzip.Writer).Close()
    			checkErr(err, "compressor close")
    		}
    		if test.chunked {
    			buf.WriteString("0\r\n\r\n")
    		}
    		buf.WriteString("Next Request Here")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 19:01:29 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  5. pkg/volume/csi/csi_client_test.go

    }
    
    func setupClientWithVolumeMountGroup(t *testing.T, stageUnstageSet bool, volumeMountGroupSet bool) csiClient {
    	return newFakeCsiDriverClientWithVolumeMountGroup(t, stageUnstageSet, volumeMountGroupSet)
    }
    
    func checkErr(t *testing.T, expectedAnError bool, actualError error) {
    	t.Helper()
    
    	errOccurred := actualError != nil
    
    	if expectedAnError && !errOccurred {
    		t.Error("expected an error")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/cmd/util/cmdutil.go

    func SubCmdRun() func(c *cobra.Command, args []string) {
    	return func(c *cobra.Command, args []string) {
    		if len(args) > 0 {
    			kubeadmutil.CheckErr(usageErrorf(c, "invalid subcommand %q", strings.Join(args, " ")))
    		}
    		c.Help()
    		kubeadmutil.CheckErr(kubeadmutil.ErrExit)
    	}
    }
    
    func usageErrorf(c *cobra.Command, format string, args ...interface{}) error {
    	msg := fmt.Sprintf(format, args...)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. src/net/lookup_test.go

    	_, err := LookupIP("golang.org")
    	checkErr(err)
    
    	// Double lookup.
    	var err1, err2 error
    	var wg sync.WaitGroup
    	wg.Add(2)
    	go func() {
    		defer wg.Done()
    		_, err1 = LookupIP("golang1.org")
    	}()
    	go func() {
    		defer wg.Done()
    		_, err2 = LookupIP("golang1.org")
    	}()
    	close(timeoutHookGo)
    	wg.Wait()
    	checkErr(err1)
    	checkErr(err2)
    
    	// Double lookup with context.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  8. src/net/http/client_test.go

    		t.Errorf("with default client Do and empty Method, expected error %q, got %q", e, g)
    	}
    
    	var checkErr error
    	var lastVia []*Request
    	var lastReq *Request
    	c.CheckRedirect = func(req *Request, via []*Request) error {
    		lastReq = req
    		lastVia = via
    		return checkErr
    	}
    	res, err := c.Get(ts.URL)
    	if err != nil {
    		t.Fatalf("Get error: %v", err)
    	}
    	res.Body.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  9. src/net/http/transport_test.go

    type cancelTest struct {
    	mode     testMode
    	newReq   func(req *Request) *Request       // prepare the request to cancel
    	cancel   func(tr *Transport, req *Request) // cancel the request
    	checkErr func(when string, err error)      // verify the expected error
    }
    
    // runCancelTestTransport uses Transport.CancelRequest.
    func runCancelTestTransport(t *testing.T, mode testMode, f func(t *testing.T, test cancelTest)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  10. pkg/kubelet/kubelet_pods.go

    		dirPath, volName := vol.BlockVolumeMapper.GetPodDeviceMapPath()
    		symlinkPath := filepath.Join(dirPath, volName)
    		if islinkExist, checkErr := blkutil.IsSymlinkExist(symlinkPath); checkErr != nil {
    			return nil, checkErr
    		} else if islinkExist {
    			// Check readOnly in PVCVolumeSource and set read only permission if it's true.
    			permission := "mrw"
    			if vol.ReadOnly {
    				permission = "r"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
Back to top