You've already forked focalboard
							
							
				mirror of
				https://github.com/mattermost/focalboard.git
				synced 2025-10-31 00:17:42 +02:00 
			
		
		
		
	fix unit test
This commit is contained in:
		| @@ -35,7 +35,7 @@ type TestHelper struct { | ||||
| } | ||||
|  | ||||
| func getTestConfig() (*config.Configuration, error) { | ||||
| 	dbType, _, err := sqlstore.PrepareNewTestDatabase() | ||||
| 	dbType, connectionString, err := sqlstore.PrepareNewTestDatabase() | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| @@ -62,17 +62,21 @@ func getTestConfig() (*config.Configuration, error) { | ||||
| 		} | ||||
| 	}` | ||||
|  | ||||
| 	dbFile, err := ioutil.TempFile("", "focalboard-test-*.db") | ||||
| 	if err != nil { | ||||
| 		panic(err) | ||||
| 	if dbType == "sqlite3" { | ||||
| 		dbFile, err := ioutil.TempFile("", "focalboard-test-*.db") | ||||
| 		if err != nil { | ||||
| 			panic(err) | ||||
| 		} | ||||
| 		dbFile.Close() | ||||
|  | ||||
| 		connectionString = dbFile.Name() | ||||
| 	} | ||||
| 	dbFile.Close() | ||||
|  | ||||
| 	return &config.Configuration{ | ||||
| 		ServerRoot:        "http://localhost:8888", | ||||
| 		Port:              8888, | ||||
| 		DBType:            dbType, | ||||
| 		DBConfigString:    dbFile.Name(), | ||||
| 		DBConfigString:    connectionString, | ||||
| 		DBTablePrefix:     "test_", | ||||
| 		WebPath:           "./pack", | ||||
| 		FilesDriver:       "local", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user