Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 378 for expects (0.25 sec)

  1. tests/gorm_test.go

    			t.Fatalf("rows affected expects: %v, got %v", 1, results.RowsAffected)
    		} else if u1.ID == 0 {
    			t.Fatalf("ID expects : not equal 0, got %v", u1.ID)
    		}
    
    		got := user{}
    		results := DB.First(&got, "id = ?", u1.ID)
    		if results.Error != nil {
    			t.Fatalf("errors happened on first: %v", results.Error)
    		} else if results.RowsAffected != 1 {
    			t.Fatalf("rows affected expects: %v, got %v", 1, results.RowsAffected)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jun 01 07:22:21 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  2. tests/soft_delete_test.go

    	}
    }
    
    func TestDeletedAtUnMarshal(t *testing.T) {
    	expected := &gorm.Model{}
    	b, _ := json.Marshal(expected)
    
    	result := &gorm.Model{}
    	_ = json.Unmarshal(b, result)
    	if result.DeletedAt != expected.DeletedAt {
    		t.Errorf("Failed, result.DeletedAt: %v is not same as expected.DeletedAt: %v", result.DeletedAt, expected.DeletedAt)
    	}
    }
    
    func TestDeletedAtOneOr(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Feb 01 06:40:55 GMT 2023
    - 5.7K bytes
    - Viewed (0)
  3. tests/count_test.go

    		t.Fatalf(fmt.Sprintf("Count should work, but got err %v", err))
    	}
    
    	expects := []User{{Name: "main"}, {Name: "other"}, {Name: "other"}}
    	sort.SliceStable(users, func(i, j int) bool {
    		return strings.Compare(users[i].Name, users[j].Name) < 0
    	})
    
    	AssertEqual(t, users, expects)
    
    	var count7 int64
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  4. utils/tests/utils.go

    		}
    
    		if expect != nil {
    			expect = reflect.Indirect(reflect.ValueOf(expect)).Interface()
    		}
    
    		if reflect.ValueOf(got).IsValid() != reflect.ValueOf(expect).IsValid() {
    			t.Errorf("%v: expect: %+v, got %+v", utils.FileWithLineNum(), expect, got)
    			return
    		}
    
    		if reflect.ValueOf(got).Kind() == reflect.Slice {
    			if reflect.ValueOf(expect).Kind() == reflect.Slice {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. docs/debugging/xattr/main.go

    	flag.StringVar(&path, "path", "", "path name where the attribute shall be applied")
    	flag.StringVar(&name, "name", "", "attribute name or it can be a wildcard if '.' is specified")
    	flag.Uint64Var(&value, "value", 0, "attribute value expects the value to be uint64")
    	flag.BoolVar(&set, "set", false, "this is a set attribute operation")
    
    	flag.Parse()
    
    	if set && value == 0 {
    		log.Fatalln("setting an attribute requires a non-zero value")
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 29 23:52:41 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  6. schema/relationship_test.go

    		t.Fatalf("expects 1 relations, but got %v", len(userSchema.Relationships.Relations))
    	}
    
    	if createdByRel, ok := userSchema.Relationships.Relations["CreatedBy"]; ok {
    		if createdByRel.FieldSchema != userSchema {
    			t.Fatalf("expects same field schema, but got new %p, old %p", createdByRel.FieldSchema, userSchema)
    		}
    	} else {
    		t.Fatalf("expects created by relations, but not found")
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  7. schema/schema_helper_test.go

    			if r.Name != relation.Name {
    				t.Errorf("schema %v relation name expects %v, but got %v", s, r.Name, relation.Name)
    			}
    
    			if r.Type != relation.Type {
    				t.Errorf("schema %v relation name expects %v, but got %v", s, r.Type, relation.Type)
    			}
    
    			if r.Schema.Name != relation.Schema {
    				t.Errorf("schema %v relation's schema expects %v, but got %v", s, relation.Schema, r.Schema.Name)
    			}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  8. tests/migrate_test.go

    	}
    
    	if tableType.Schema() != tblSchema {
    		t.Fatalf("expected tblSchema to be %s but got %s", tblSchema, tableType.Schema())
    	}
    
    	if tableType.Name() != tblName {
    		t.Fatalf("expected table name to be %s but got %s", tblName, tableType.Name())
    	}
    
    	if tableType.Type() != tblType {
    		t.Fatalf("expected table type to be %s but got %s", tblType, tableType.Type())
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  9. tests/distinct_test.go

    	}
    
    	expects := []User{
    		{Name: "distinct", Age: 20},
    		{Name: "distinct", Age: 18},
    		{Name: "distinct-2", Age: 18},
    		{Name: "distinct-3", Age: 18},
    	}
    
    	if len(results) != 4 {
    		t.Fatalf("invalid results length found, expects: %v, got %v", len(expects), len(results))
    	}
    
    	for idx, expect := range expects {
    		AssertObjEqual(t, results[idx], expect, "Name", "Age")
    	}
    
    	var count int64
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  10. cni/pkg/iptables/iptables.go

    			}
    		}
    	}
    	return errors.Join(delErrs...)
    }
    
    // Setup iptables rules for in-pod mode. Ideally this should be an idempotent function.
    // NOTE that this expects to be run from within the pod network namespace!
    func (cfg *IptablesConfigurator) CreateInpodRules(hostProbeSNAT *netip.Addr) error {
    	// Append our rules here
    	builder := cfg.appendInpodRules(hostProbeSNAT)
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 19.6K bytes
    - Viewed (0)
Back to top