Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 160 for mustParse (0.24 sec)

  1. pkg/registry/storage/volumeattachment/strategy_test.go

    	volumeAttachment.Spec.Source.PersistentVolumeName = nil
    	volumeAttachment.Spec.Source.InlineVolumeSpec = &api.PersistentVolumeSpec{
    		Capacity: api.ResourceList{
    			api.ResourceName(api.ResourceStorage): resource.MustParse("10"),
    		},
    		AccessModes: []api.PersistentVolumeAccessMode{api.ReadWriteOnce},
    		PersistentVolumeSource: api.PersistentVolumeSource{
    			CSI: &api.CSIPersistentVolumeSource{
    				Driver:       "com.test.foo",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  2. pkg/controller/testutil/test_utils.go

    	return &v1.Node{
    		ObjectMeta: metav1.ObjectMeta{Name: name},
    		Status: v1.NodeStatus{
    			Capacity: v1.ResourceList{
    				v1.ResourceName(v1.ResourceCPU):    resource.MustParse("10"),
    				v1.ResourceName(v1.ResourceMemory): resource.MustParse("10G"),
    			},
    		},
    	}
    }
    
    // NewPod is a helper function for creating Pods for testing.
    func NewPod(name, host string) *v1.Pod {
    	pod := &v1.Pod{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 15.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/library/quantity_test.go

    	} else {
    		t.Fatal("expected result must not be nil")
    	}
    
    }
    
    func TestQuantity(t *testing.T) {
    	twelveMi := resource.MustParse("12Mi")
    	trueVal := types.Bool(true)
    	falseVal := types.Bool(false)
    
    	cases := []struct {
    		name               string
    		expr               string
    		expectValue        ref.Val
    		expectedCompileErr []string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  4. pkg/volume/csi/csi_client_test.go

    			volumePath: "/foo/bar",
    			newSize:    resource.MustParse("10Gi"),
    			mustFail:   false,
    		},
    		{
    			name:       "with missing volume-id",
    			volumePath: "/foo/bar",
    			newSize:    resource.MustParse("10Gi"),
    			mustFail:   true,
    		},
    		{
    			name:     "with missing volume path",
    			volID:    "vol-1234",
    			newSize:  resource.MustParse("10Gi"),
    			mustFail: true,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  5. pkg/controller/volume/persistentvolume/framework_test.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name:            name,
    			ResourceVersion: "1",
    		},
    		Spec: v1.PersistentVolumeSpec{
    			Capacity: v1.ResourceList{
    				v1.ResourceName(v1.ResourceStorage): resource.MustParse(capacity),
    			},
    			PersistentVolumeSource: v1.PersistentVolumeSource{
    				GCEPersistentDisk: &v1.GCEPersistentDiskVolumeSource{},
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 01 09:54:00 UTC 2023
    - 38.3K bytes
    - Viewed (0)
  6. cmd/erasure-sets_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"context"
    	"os"
    	"path/filepath"
    	"testing"
    
    	"github.com/google/uuid"
    )
    
    var testUUID = uuid.MustParse("f5c58c61-7175-4018-ab5e-a94fe9c2de4e")
    
    func BenchmarkCrcHash(b *testing.B) {
    	cases := []struct {
    		key int
    	}{
    		{16},
    		{64},
    		{128},
    		{256},
    		{512},
    		{1024},
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 12 07:21:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/example_test.go

    func FToC(f float64) Celsius { return Celsius(f - 32 / 9 * 5) }
    const Boiling Celsius = 100
    func Unused() { {}; {{ var x int; _ = x }} } // make sure empty block scopes get printed
    `,
    	} {
    		files = append(files, mustParse(src))
    	}
    
    	// Type-check a package consisting of these files.
    	// Type information for the imported "fmt" package
    	// comes from $GOROOT/pkg/$GOOS_$GOOARCH/fmt.a.
    	conf := types2.Config{Importer: defaultImporter()}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  8. pkg/util/flag/flags_test.go

    		}
    	}
    }
    
    func TestReservedMemoryVar(t *testing.T) {
    	resourceNameHugepages1Gi := v1.ResourceName(fmt.Sprintf("%s1Gi", v1.ResourceHugePagesPrefix))
    	memory1Gi := resource.MustParse("1Gi")
    	testCases := []struct {
    		desc      string
    		argc      string
    		expectErr bool
    		expectVal []kubeletconfig.MemoryReservation
    	}{
    		{
    			desc: "valid input",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 14 10:45:23 UTC 2021
    - 8.8K bytes
    - Viewed (0)
  9. logger/sql_test.go

    }
    
    func TestExplainSQL(t *testing.T) {
    	type role string
    	type password []byte
    	type intType int
    	type floatType float64
    	var (
    		tt                 = now.MustParse("2020-02-23 11:10:10")
    		myrole             = role("admin")
    		pwd                = password("pass")
    		jsVal              = []byte(`{"Name":"test","Val":"test"}`)
    		js                 = JSON(jsVal)
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Mar 21 08:00:02 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. pkg/apis/resource/structured/namedresources/validation/validation_test.go

    	resources := &resourceapi.NamedResourcesResources{
    		Instances: instances,
    	}
    	return resources
    }
    
    func TestValidateResources(t *testing.T) {
    	goodName := "foo"
    	badName := "!@#$%^"
    	quantity := resource.MustParse("1")
    
    	scenarios := map[string]struct {
    		resources    *resourceapi.NamedResourcesResources
    		wantFailures field.ErrorList
    	}{
    		"empty": {
    			resources: testResources(nil),
    		},
    		"good": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:13 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top