More robust test, does not depend on test run order and concurrently running tests
This commit is contained in:
parent
0a2fdc8cc3
commit
2fc81a8180
1 changed files with 2 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
(let [db (mg/get-db "monger-test")
|
(let [db (mg/get-db "monger-test")
|
||||||
coll "meta.migrations"
|
coll "meta.migrations"
|
||||||
key "1"]
|
key "1"]
|
||||||
|
(mc/remove db coll {})
|
||||||
(is (not (mc/any? db coll {:_id key})))
|
(is (not (mc/any? db coll {:_id key})))
|
||||||
(is (not (contains? (applied-migration-ids db) key)))
|
(is (not (contains? (applied-migration-ids db) key)))
|
||||||
(add-migration-id db key)
|
(add-migration-id db key)
|
||||||
|
|
@ -30,6 +31,7 @@
|
||||||
(let [db (mg/get-db "monger-test")
|
(let [db (mg/get-db "monger-test")
|
||||||
coll "meta.migrations"
|
coll "meta.migrations"
|
||||||
key "1"]
|
key "1"]
|
||||||
|
(mc/remove db coll {})
|
||||||
(add-migration-id db key)
|
(add-migration-id db key)
|
||||||
(is (mc/any? db coll {:_id key}))
|
(is (mc/any? db coll {:_id key}))
|
||||||
(is (contains? (applied-migration-ids db) key))
|
(is (contains? (applied-migration-ids db) key))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue