Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for DSN (0.18 sec)

  1. .github/workflows/tests.yml

          uses: actions/cache@v4
          with:
            path: ~/go/pkg/mod
            key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
    
        - name: Tests
          run: GITHUB_ACTION=true GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./tests/tests_all.sh
    
      mariadb:
        strategy:
          matrix:
            dbversion: [ 'mariadb:latest' ]
            go: ['1.21', '1.20', '1.19']
    Others
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Jan 29 02:34:20 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  2. tests/gorm_test.go

    package tests_test
    
    import (
    	"testing"
    
    	"gorm.io/driver/mysql"
    
    	"gorm.io/gorm"
    )
    
    func TestOpen(t *testing.T) {
    	dsn := "gorm:gorm@tcp(localhost:9910)/gorm?loc=Asia%2FHongKong" // invalid loc
    	_, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
    	if err == nil {
    		t.Fatalf("should returns error but got nil")
    	}
    }
    
    func TestReturningWithNullToZeroValues(t *testing.T) {
    	dialect := DB.Dialector.Name()
    	switch dialect {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jun 01 07:22:21 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. tests/tests_test.go

    	dbDSN := os.Getenv("GORM_DSN")
    	switch os.Getenv("GORM_DIALECT") {
    	case "mysql":
    		log.Println("testing mysql...")
    		if dbDSN == "" {
    			dbDSN = mysqlDSN
    		}
    		db, err = gorm.Open(mysql.Open(dbDSN), cfg)
    	case "postgres":
    		log.Println("testing postgres...")
    		if dbDSN == "" {
    			dbDSN = postgresDSN
    		}
    		db, err = gorm.Open(postgres.New(postgres.Config{
    			DSN:                  dbDSN,
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  4. tests/connpool_test.go

    	return c.db.QueryRowContext(ctx, query, args...)
    }
    
    func TestConnPoolWrapper(t *testing.T) {
    	dialect := os.Getenv("GORM_DIALECT")
    	if dialect != "mysql" {
    		t.SkipNow()
    	}
    
    	dbDSN := os.Getenv("GORM_DSN")
    	if dbDSN == "" {
    		dbDSN = "gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"
    	}
    	nativeDB, err := sql.Open("mysql", dbDSN)
    	if err != nil {
    		t.Fatalf("Should open db success, but got %v", err)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
Back to top