Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for testname1 (0.39 sec)

  1. tests/query_test.go

    func TestQueryScanToArray(t *testing.T) {
    	err := DB.Create(&User{Name: "testname1", Age: 10}).Error
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	users := [2]*User{{Name: "1"}, {Name: "2"}}
    	err = DB.Model(&User{}).Where("name = ?", "testname1").Find(&users).Error
    	if err != nil {
    		t.Fatal(err)
    	}
    	if users[0] == nil || users[0].Name != "testname1" {
    		t.Error("users[0] not covered")
    	}
    	if users[1] != nil {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 49.8K bytes
    - Viewed (0)
  2. pkg/volume/csi/csi_attacher_test.go

    				t.Skipf("Skipping intentional failure on existing data when running as root.")
    			}
    		}
    		t.Run(tc.testName, func(t *testing.T) {
    			if tc.skipOnWindows && goruntime.GOOS == "windows" {
    				t.Skipf("Skipping test case on Windows: %s", tc.testName)
    			}
    			t.Logf("Running test case: %s", tc.testName)
    
    			// Setup
    			// Create a new attacher
    			fakeClient := fakeclient.NewSimpleClientset()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 12:23:16 UTC 2024
    - 58.1K bytes
    - Viewed (0)
  3. src/cmd/dist/test.go

    	} else if strings.HasSuffix(name, ":racebench") && heading != "Running benchmarks briefly." {
    		panic("racebench variant is reserved exclusively for registerRaceBenchTest")
    	}
    	if t.testNames == nil {
    		t.testNames = make(map[string]bool)
    	}
    	t.testNames[name] = true
    	t.tests = append(t.tests, distTest{
    		name:    name,
    		heading: heading,
    		fn:      fn,
    	})
    }
    
    type registerTestOpt interface {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
  4. tests/integration/security/authz_test.go

    							allow: true,
    						},
    					}
    
    					for _, c := range cases {
    						c := c
    						testName := fmt.Sprintf("%s%s(%s)/http", c.host, c.path, c.allow)
    						if len(c.ip) > 0 {
    							testName = c.ip + "->" + testName
    						}
    						t.NewSubTest(testName).Run(func(t framework.TestContext) {
    							wantCode := http.StatusOK
    							if !c.allow {
    								wantCode = http.StatusForbidden
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 08 23:36:51 UTC 2024
    - 50.1K bytes
    - Viewed (0)
  5. pkg/apis/storage/validation/validation_test.go

    			shouldSucceed: false,
    		},
    	}
    
    	for testName, testCase := range cases {
    		errs := ValidateStorageClass(testCase.class)
    		if testCase.shouldSucceed && len(errs) != 0 {
    			t.Errorf("Expected success for test %q, got %v", testName, errs)
    		}
    		if !testCase.shouldSucceed && len(errs) == 0 {
    			t.Errorf("Expected failure for test %q, got success", testName)
    		}
    	}
    }
    
    type updateTest struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 69.7K bytes
    - Viewed (0)
  6. src/net/http/fs_test.go

    	}
    }
    
    func getBody(t *testing.T, testName string, req Request, client *Client) (*Response, []byte) {
    	r, err := client.Do(&req)
    	if err != nil {
    		t.Fatalf("%s: for URL %q, send error: %v", testName, req.URL.String(), err)
    	}
    	b, err := io.ReadAll(r.Body)
    	if err != nil {
    		t.Fatalf("%s: for URL %q, reading body: %v", testName, req.URL.String(), err)
    	}
    	return r, b
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 49.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/celcoststability_test.go

    			t.Parallel()
    			for validRule, expectedCost := range tt.expectCost {
    				validRule := validRule
    				expectedCost := expectedCost
    				testName := validRule
    				if len(testName) > 127 {
    					testName = testName[:127]
    				}
    				t.Run(testName, func(t *testing.T) {
    					t.Parallel()
    					s := withRule(*tt.schema, validRule)
    					celValidator := NewValidator(&s, true, celconfig.PerCallLimit)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:20:16 UTC 2024
    - 80.2K bytes
    - Viewed (0)
  8. src/testing/testing.go

    		p.lastName = testName
    	} else if p.lastName != testName {
    		fmt.Fprintf(p.w, "%s=== NAME  %s\n", p.prefix(), testName)
    		p.lastName = testName
    	}
    
    	fmt.Fprintf(p.w, format, args...)
    }
    
    // The maximum number of stack frames to go through when skipping helper functions for
    // the purpose of decorating log messages.
    const maxStackLen = 50
    
    // common holds the elements common between T and B and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
  9. src/net/dnsclient_unix_test.go

    			return err
    		}
    		panic("unknown query method")
    	}
    
    	for i, v := range longDNSNamesTests {
    		for _, testName := range methodTests {
    			err := query(testName, v.req)
    			if v.fail {
    				if err == nil {
    					t.Errorf("%v: Lookup%v: unexpected success", i, testName)
    					break
    				}
    
    				expectedErr := DNSError{Err: errNoSuchHost.Error(), Name: v.req, IsNotFound: true}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 72.4K bytes
    - Viewed (0)
  10. pkg/kubelet/volumemanager/reconciler/reconciler_test.go

    		for tcIndex := range tests {
    			mode := modes[modeIndex]
    			tc := tests[tcIndex]
    			testName := fmt.Sprintf("%s [%s]", tc.name, mode)
    			uniqueTestString := fmt.Sprintf("global-mount-%s", testName)
    			uniquePodDir := fmt.Sprintf("%s-%x", kubeletPodsDir, md5.Sum([]byte(uniqueTestString)))
    			t.Run(testName+"[", func(t *testing.T) {
    				t.Parallel()
    				pv := &v1.PersistentVolume{
    					ObjectMeta: metav1.ObjectMeta{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 09 07:34:33 UTC 2024
    - 75.4K bytes
    - Viewed (0)
Back to top