store/sqlstore cleanup and postgres tests (#7595)

* sqlstore cleanup / postgres tests

* remove stopped containers

* cmd/platform compile fix

* remove test-postgres target from makefile
Этот коммит содержится в:
Chris
2017-10-09 10:16:14 -07:00
коммит произвёл Joram Wilander
родитель 70e5f00241
Коммит 0f66b6e726
22 изменённых файлов: 334 добавлений и 119 удалений

Просмотреть файл

@@ -219,7 +219,7 @@ func (fs SqlFileInfoStore) PermanentDelete(fileId string) store.StoreChannel {
func (s SqlFileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) store.StoreChannel {
return store.Do(func(result *store.StoreResult) {
var query string
if *utils.Cfg.SqlSettings.DriverName == "postgres" {
if s.DriverName() == "postgres" {
query = "DELETE from FileInfo WHERE Id = any (array (SELECT Id FROM FileInfo WHERE CreateAt < :EndTime LIMIT :Limit))"
} else {
query = "DELETE from FileInfo WHERE CreateAt < :EndTime LIMIT :Limit"