Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for GORM_DIALECT (0.23 sec)

  1. tests/tests_all.sh

        cd ..
      fi
    fi
    
    
    for dialect in "${dialects[@]}" ; do
      if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ]
      then
        echo "testing ${dialect}..."
    
        if [ "$GORM_VERBOSE" = "" ]
        then
          GORM_DIALECT=${dialect} go test -race -count=1 ./...
          if [ -d tests ]
          then
            cd tests
            GORM_DIALECT=${dialect} go test -race -count=1 ./...
            cd ..
          fi
        else
    Shell Script
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  2. .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=sqlite ./tests/tests_all.sh
    
      mysql:
        strategy:
          matrix:
            dbversion: ['mysql:latest', 'mysql:5.7']
            go: ['1.21', '1.20', '1.19']
            platform: [ubuntu-latest]
    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)
  3. tests/helper_test.go

    		t.Skipf("This test case skipped, because of TiDB '%s'", reason)
    	}
    }
    
    func isTiDB() bool {
    	return os.Getenv("GORM_DIALECT") == "tidb"
    }
    
    func isMysql() bool {
    	return os.Getenv("GORM_DIALECT") == "mysql"
    }
    
    func isSqlite() bool {
    	return os.Getenv("GORM_DIALECT") == "sqlite"
    }
    
    func db(unscoped bool) *gorm.DB {
    	if unscoped {
    		return DB.Unscoped()
    	} else {
    		return DB
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
  4. tests/tests_test.go

    			os.Exit(1)
    		}
    
    		RunMigrations()
    	}
    }
    
    func OpenTestConnection(cfg *gorm.Config) (db *gorm.DB, err error) {
    	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...")
    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)
  5. tests/connpool_test.go

    	c.got = append(c.got, query)
    	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"
    	}
    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