Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 328 for newWith (0.37 sec)

  1. src/cmd/go/internal/robustio/robustio_other.go

    // license that can be found in the LICENSE file.
    
    //go:build !windows && !darwin
    
    package robustio
    
    import (
    	"os"
    )
    
    func rename(oldpath, newpath string) error {
    	return os.Rename(oldpath, newpath)
    }
    
    func readFile(filename string) ([]byte, error) {
    	return os.ReadFile(filename)
    }
    
    func removeAll(path string) error {
    	return os.RemoveAll(path)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 516 bytes
    - Viewed (0)
  2. pkg/apis/resource/validation/validation_resourceslice_test.go

    		},
    		"missing-name": {
    			wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")},
    			slice:        testResourceSlice("", goodName, driverName),
    		},
    		"bad-name": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 14 17:07:36 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  3. pkg/apis/resource/validation/validation_podschedulingcontext_test.go

    		},
    		"missing-name": {
    			wantFailures:  field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")},
    			schedulingCtx: testPodSchedulingContexts("", goodNS, goodPodSchedulingSpec),
    		},
    		"bad-name": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 09:18:08 UTC 2023
    - 13.3K bytes
    - Viewed (0)
  4. pkg/test/framework/suite_test.go

    	})
    	t.Run("interface reference", func(t *testing.T) {
    		g := NewWithT(t)
    		var ref OtherInterface
    		tracked := &resource.FakeResource{IDValue: "1"}
    		err := act(&ref, tracked)
    		g.Expect(err).To(BeNil())
    		g.Expect(tracked).To(Equal(ref))
    	})
    	t.Run("slice reference", func(t *testing.T) {
    		g := NewWithT(t)
    		existing := &resource.FakeResource{IDValue: "1"}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 22:12:34 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  5. pkg/apis/resource/validation/validation_resourceclaim_test.go

    		},
    		"missing-name": {
    			wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")},
    			claim:        testClaim("", goodNS, goodClaimSpec),
    		},
    		"bad-name": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 09:18:10 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  6. pkg/apis/storagemigration/validation/validation.go

    	allErrs = append(allErrs, apivalidation.ValidateObjectMeta(&svm.ObjectMeta, false, apimachineryvalidation.NameIsDNSSubdomain, field.NewPath("metadata"))...)
    
    	allErrs = checkAndAppendError(allErrs, field.NewPath("spec", "resource", "resource"), svm.Spec.Resource.Resource, "resource is required")
    	allErrs = checkAndAppendError(allErrs, field.NewPath("spec", "resource", "version"), svm.Spec.Resource.Version, "version is required")
    
    	return allErrs
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 04:18:56 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. pkg/config/analysis/local/analyze_test.go

    	a.fn(ctx)
    }
    
    func TestAbortWithNoSources(t *testing.T) {
    	g := NewWithT(t)
    
    	cancel := make(chan struct{})
    
    	sa := NewSourceAnalyzer(blankCombinedAnalyzer, "", "", nil)
    	_, err := sa.Analyze(cancel)
    	g.Expect(err).To(Not(BeNil()))
    }
    
    func TestAnalyzersRun(t *testing.T) {
    	g := NewWithT(t)
    
    	cancel := make(chan struct{})
    
    	r := createTestResource(t, "ns", "resource", "v1")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jan 09 07:43:43 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  8. pkg/apis/policy/validation/validation_test.go

    	spec := policy.PodDisruptionBudgetSpec{
    		MinAvailable:   &minAvailable,
    		MaxUnavailable: &maxUnavailable,
    	}
    	errs := ValidatePodDisruptionBudgetSpec(spec, PodDisruptionBudgetValidationOptions{true}, field.NewPath("foo"))
    	if len(errs) == 0 {
    		t.Errorf("unexpected success for %v", spec)
    	}
    }
    
    func TestValidateMinAvailablePodDisruptionBudgetSpec(t *testing.T) {
    	successCases := []intstr.IntOrString{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 07 20:44:13 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  9. pilot/pkg/config/file/util/kubeyaml/kubeyaml_test.go

    			g := NewWithT(t)
    
    			var by [][]byte
    			for _, s := range c.split {
    				by = append(by, []byte(s))
    			}
    			actual := Join(by...)
    
    			g.Expect(actual).To(Equal([]byte(c.merged)))
    		})
    	}
    }
    
    func TestJoinString(t *testing.T) {
    	for i, c := range joinCases {
    		t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
    			g := NewWithT(t)
    
    			actual := JoinString(c.split...)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  10. src/path/filepath/symlink_windows.go

    	return volume + normPath, nil
    }
    
    func evalSymlinks(path string) (string, error) {
    	newpath, err := walkSymlinks(path)
    	if err != nil {
    		return "", err
    	}
    	newpath, err = toNorm(newpath, normBase)
    	if err != nil {
    		return "", err
    	}
    	return newpath, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 07:42:17 UTC 2023
    - 2.9K bytes
    - Viewed (0)
Back to top