Skip to content

Commit 980c6ed

Browse files
committed
fix tests
1 parent 755a285 commit 980c6ed

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

test/phoenix/sync/application_test.exs

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,11 @@ defmodule Phoenix.Sync.ApplicationTest do
8686

8787
validate_repo_connection_opts!(opts)
8888

89-
# assert %{
90-
# storage: {Electric.ShapeCache.FileStorage, [storage_dir: "/tmp/" <> storage_dir]},
91-
# persistent_kv: %Electric.PersistentKV.Filesystem{
92-
# root: "/tmp/" <> storage_dir
93-
# }
94-
# } = Map.new(opts)
9589
assert %{
96-
storage: {Electric.ShapeCache.InMemoryStorage, _},
97-
persistent_kv: %Electric.PersistentKV.Memory{}
90+
storage: {Electric.ShapeCache.FileStorage, [storage_dir: "/tmp/" <> storage_dir]},
91+
persistent_kv: %Electric.PersistentKV.Filesystem{
92+
root: "/tmp/" <> storage_dir
93+
}
9894
} = Map.new(opts)
9995
end
10096

@@ -158,14 +154,9 @@ defmodule Phoenix.Sync.ApplicationTest do
158154
validate_repo_connection_opts!(opts)
159155

160156
assert %{
161-
storage: {Electric.ShapeCache.InMemoryStorage, _},
162-
persistent_kv: %Electric.PersistentKV.Memory{}
157+
storage: {Electric.ShapeCache.FileStorage, [storage_dir: "/something"]},
158+
persistent_kv: %Electric.PersistentKV.Filesystem{root: "/something"}
163159
} = Map.new(opts)
164-
165-
# assert %{
166-
# storage: {Electric.ShapeCache.FileStorage, [storage_dir: "/something"]},
167-
# persistent_kv: %Electric.PersistentKV.Filesystem{root: "/something"}
168-
# } = Map.new(opts)
169160
end
170161

171162
test "embedded mode test env" do
@@ -263,13 +254,9 @@ defmodule Phoenix.Sync.ApplicationTest do
263254

264255
api = App.plug_opts(config)
265256

266-
# assert %Electric.Shapes.Api{
267-
# storage: {Electric.ShapeCache.FileStorage, %{base_path: "/something" <> _}},
268-
# persistent_kv: %Electric.PersistentKV.Filesystem{root: "/something"}
269-
# } = api
270257
assert %Electric.Shapes.Api{
271-
storage: {Electric.ShapeCache.InMemoryStorage, _},
272-
persistent_kv: %Electric.PersistentKV.Memory{}
258+
storage: {Electric.ShapeCache.FileStorage, %{base_path: "/something" <> _}},
259+
persistent_kv: %Electric.PersistentKV.Filesystem{root: "/something"}
273260
} = api
274261
end
275262

0 commit comments

Comments
 (0)