mirror of
https://github.com/penpot/penpot.git
synced 2025-05-02 22:55:53 +02:00
💄 Format backend code
This commit is contained in:
parent
cfe7ba34f7
commit
0b29aaecc4
11 changed files with 43 additions and 54 deletions
|
@ -20,8 +20,8 @@
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.db :as db]
|
[app.db :as db]
|
||||||
[app.main :as main]
|
[app.main :as main]
|
||||||
[app.media :as-alias mtx]
|
|
||||||
[app.media]
|
[app.media]
|
||||||
|
[app.media :as-alias mtx]
|
||||||
[app.migrations]
|
[app.migrations]
|
||||||
[app.msgbus :as-alias mbus]
|
[app.msgbus :as-alias mbus]
|
||||||
[app.rpc :as-alias rpc]
|
[app.rpc :as-alias rpc]
|
||||||
|
|
|
@ -233,8 +233,7 @@
|
||||||
(t/is (= 1 (:processed res))))
|
(t/is (= 1 (:processed res))))
|
||||||
|
|
||||||
(let [rows (th/db-query :file-data-fragment {:file-id (:id file)})]
|
(let [rows (th/db-query :file-data-fragment {:file-id (:id file)})]
|
||||||
(t/is (= 2 (count rows))))
|
(t/is (= 2 (count rows)))))))
|
||||||
)))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -904,8 +903,7 @@
|
||||||
(let [error (:error out)
|
(let [error (:error out)
|
||||||
error-data (ex-data error)]
|
error-data (ex-data error)]
|
||||||
(t/is (th/ex-info? error))
|
(t/is (th/ex-info? error))
|
||||||
(t/is (= (:type error-data) :not-found))))
|
(t/is (= (:type error-data) :not-found))))))
|
||||||
))
|
|
||||||
|
|
||||||
|
|
||||||
(t/deftest object-thumbnails-ops
|
(t/deftest object-thumbnails-ops
|
||||||
|
|
|
@ -248,9 +248,7 @@
|
||||||
(let [result (th/run-task! :storage-gc-deleted {:min-age 0})]
|
(let [result (th/run-task! :storage-gc-deleted {:min-age 0})]
|
||||||
(t/is (= 1 (:deleted result))))
|
(t/is (= 1 (:deleted result))))
|
||||||
|
|
||||||
(t/is (some? (sto/get-object storage (:media-id row2))))
|
(t/is (some? (sto/get-object storage (:media-id row2)))))))
|
||||||
|
|
||||||
)))
|
|
||||||
|
|
||||||
(t/deftest error-on-direct-storage-obj-deletion
|
(t/deftest error-on-direct-storage-obj-deletion
|
||||||
(let [storage (::sto/storage th/*system*)
|
(let [storage (::sto/storage th/*system*)
|
||||||
|
|
|
@ -153,8 +153,7 @@
|
||||||
|
|
||||||
(let [res (th/run-task! :storage-gc-touched {:min-age 0})]
|
(let [res (th/run-task! :storage-gc-touched {:min-age 0})]
|
||||||
(t/is (= 0 (:freeze res)))
|
(t/is (= 0 (:freeze res)))
|
||||||
(t/is (= 6 (:delete res))))
|
(t/is (= 6 (:delete res))))))
|
||||||
))
|
|
||||||
|
|
||||||
(t/deftest font-deletion-2
|
(t/deftest font-deletion-2
|
||||||
(let [prof (th/create-profile* 1 {:is-active true})
|
(let [prof (th/create-profile* 1 {:is-active true})
|
||||||
|
@ -216,8 +215,7 @@
|
||||||
|
|
||||||
(let [res (th/run-task! :storage-gc-touched {:min-age 0})]
|
(let [res (th/run-task! :storage-gc-touched {:min-age 0})]
|
||||||
(t/is (= 0 (:freeze res)))
|
(t/is (= 0 (:freeze res)))
|
||||||
(t/is (= 3 (:delete res))))
|
(t/is (= 3 (:delete res))))))
|
||||||
))
|
|
||||||
|
|
||||||
(t/deftest font-deletion-3
|
(t/deftest font-deletion-3
|
||||||
(let [prof (th/create-profile* 1 {:is-active true})
|
(let [prof (th/create-profile* 1 {:is-active true})
|
||||||
|
@ -278,6 +276,4 @@
|
||||||
|
|
||||||
(let [res (th/run-task! :storage-gc-touched {:min-age 0})]
|
(let [res (th/run-task! :storage-gc-touched {:min-age 0})]
|
||||||
(t/is (= 0 (:freeze res)))
|
(t/is (= 0 (:freeze res)))
|
||||||
(t/is (= 3 (:delete res))))
|
(t/is (= 3 (:delete res))))))
|
||||||
|
|
||||||
))
|
|
||||||
|
|
|
@ -166,9 +166,7 @@
|
||||||
out (th/command! params)]
|
out (th/command! params)]
|
||||||
;; (th/print-result! out)
|
;; (th/print-result! out)
|
||||||
(let [result (:result out)]
|
(let [result (:result out)]
|
||||||
(t/is (= uuid/zero (:id result)))))
|
(t/is (= uuid/zero (:id result)))))))
|
||||||
|
|
||||||
))
|
|
||||||
|
|
||||||
(t/deftest registration-domain-whitelist
|
(t/deftest registration-domain-whitelist
|
||||||
(let [whitelist #{"gmail.com" "hey.com" "ya.ru"}]
|
(let [whitelist #{"gmail.com" "hey.com" "ya.ru"}]
|
||||||
|
|
|
@ -462,5 +462,4 @@
|
||||||
(t/is (dt/instant? (:deleted-at (first rows)))))
|
(t/is (dt/instant? (:deleted-at (first rows)))))
|
||||||
|
|
||||||
(let [result (th/run-task! :objects-gc {:min-age 0})]
|
(let [result (th/run-task! :objects-gc {:min-age 0})]
|
||||||
(t/is (= 5 (:processed result))))
|
(t/is (= 5 (:processed result))))))
|
||||||
))
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue