Skip to content
Snippets Groups Projects
Commit 622a8c90 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

make it possible to complete the initialization process from outside the...

make it possible to complete the initialization process from outside the metabase.core namespace and trigger it in our test setup process so that logins work for unit tests again.
parent 59073748
No related branches found
No related tags found
No related merge requests found
......@@ -80,10 +80,15 @@
(= @metabase-initialization-progress 1.0))
(defn initialization-progress
"Metabase is initialized and ready to be served"
"Get the current progress of the Metabase initialize"
[]
@metabase-initialization-progress)
(defn initialization-complete!
"Complete the Metabase initialization by setting its progress to 100%"
[]
(reset! metabase-initialization-progress 1.0))
(defn- -init-create-setup-token
"Create and set a new setup token, and open the setup URL on the user's system."
[]
......@@ -147,7 +152,7 @@
(sample-data/update-sample-dataset-if-needed!)))
(log/info "Metabase Initialization COMPLETE")
(reset! metabase-initialization-progress 1.0)
(initialization-complete!)
true)
......
......@@ -82,7 +82,8 @@
(let [setup-db (future (time (do (log/info "Setting up test DB and running migrations...")
(db/setup-db :auto-migrate true)
(load-test-datasets)
(metabase.models.setting/set :site-name "Metabase Test"))))]
(metabase.models.setting/set :site-name "Metabase Test")
(core/initialization-complete!))))]
(core/start-jetty)
@setup-db))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment