diff --git a/lib/edgedb/connection/config.ex b/lib/edgedb/connection/config.ex index 39fa5426..434f9494 100644 --- a/lib/edgedb/connection/config.ex +++ b/lib/edgedb/connection/config.ex @@ -192,6 +192,16 @@ defmodule EdgeDB.Connection.Config do project_opts end + database_path = @path_module.join(stash_dir, "database") + + project_opts = + if @file_module.exists?(database_path) do + database = @file_module.read!(database_path) + Keyword.merge(project_opts, database: database) + else + project_opts + end + {resolved_opts, _compounds} = resolve_opts(resolved_opts, project_opts) resolved_opts diff --git a/test/support/shared-client-testcases b/test/support/shared-client-testcases index f16d2c17..b8959be8 160000 --- a/test/support/shared-client-testcases +++ b/test/support/shared-client-testcases @@ -1 +1 @@ -Subproject commit f16d2c17f502ad5bd5c35d8872cd5dc962d0fb7e +Subproject commit b8959be8968aceeeac2af3da7639de02b19d7030 diff --git a/test/support/shared_case.ex b/test/support/shared_case.ex index b949bbf1..dab7fca3 100644 --- a/test/support/shared_case.ex +++ b/test/support/shared_case.ex @@ -127,12 +127,14 @@ defmodule Tests.Support.SharedCase do dir = String.replace(file, "${HASH}", hash) instance = Path.join(dir, "instance-name") profile = Path.join(dir, "cloud-profile") + database = Path.join(dir, "database") project = Path.join(dir, "project-path") files |> Map.put(dir, "") |> Map.put(instance, data["instance-name"]) |> Map.put(profile, data["cloud-profile"]) + |> Map.put(database, data["database"]) |> Map.put(project, data["project-path"]) else Map.put(files, file, data)