Update the sync tests.
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-04-15 16:53:31 +03:00
parent 3285d3860e
commit d2c539333c
15 changed files with 80 additions and 35 deletions
@@ -12,7 +12,7 @@ defmodule DecentralisedBookIndex.Sync.AuthorAliasRegistrySync do
alias_registry
|> Ash.Changeset.for_update(:sync, attrs)
|> Ash.update!()
|> Ash.update!(authorize?: false)
:ok
@@ -23,7 +23,7 @@ defmodule DecentralisedBookIndex.Sync.AuthorAliasRegistrySync do
AuthorAliasRegistry
|> Ash.Changeset.for_create(:sync_create, attrs)
|> Ash.create!()
|> Ash.create!(authorize?: false)
:ok
end
@@ -16,7 +16,7 @@ defmodule DecentralisedBookIndex.Sync.AuthorSync do
author
|> Ash.Changeset.for_update(:sync, attrs)
|> Ash.update!()
|> Ash.update!(authorize?: false)
:ok
@@ -28,7 +28,7 @@ defmodule DecentralisedBookIndex.Sync.AuthorSync do
Author
|> Ash.Changeset.for_create(:sync_create, attrs)
|> Ash.create!()
|> Ash.create!(authorize?: false)
:ok
end
@@ -12,7 +12,7 @@ defmodule DecentralisedBookIndex.Sync.BookEditionsRegistrySync do
editions_registry
|> Ash.Changeset.for_update(:sync, attrs)
|> Ash.update!()
|> Ash.update!(authorize?: false)
:ok
@@ -23,7 +23,7 @@ defmodule DecentralisedBookIndex.Sync.BookEditionsRegistrySync do
BookEditionsRegistry
|> Ash.Changeset.for_create(:sync_create, attrs)
|> Ash.create!()
|> Ash.create!(authorize?: false)
:ok
end
@@ -16,7 +16,7 @@ defmodule DecentralisedBookIndex.Sync.BookSync do
book
|> Ash.Changeset.for_update(:sync, attrs)
|> Ash.update!()
|> Ash.update!(authorize?: false)
:ok
{:error, %Ash.Error.Query.NotFound{}} ->
@@ -27,7 +27,7 @@ defmodule DecentralisedBookIndex.Sync.BookSync do
Book
|> Ash.Changeset.for_create(:sync_create, attrs)
|> Ash.create!()
|> Ash.create!(authorize?: false)
:ok
end
@@ -12,7 +12,7 @@ defmodule DecentralisedBookIndex.Sync.PublisherSync do
publisher
|> Ash.Changeset.for_update(:sync, attrs)
|> Ash.update!()
|> Ash.update!(authorize?: false)
:ok
{:error, %Ash.Error.Query.NotFound{}} ->
@@ -22,7 +22,7 @@ defmodule DecentralisedBookIndex.Sync.PublisherSync do
Publisher
|> Ash.Changeset.for_create(:sync_create, attrs)
|> Ash.create!()
|> Ash.create!(authorize?: false)
:ok
end
@@ -7,7 +7,7 @@ defmodule DecentralisedBookIndex.Sync.SyncServerTask do
alias DecentralisedBookIndex.SyncTasks.SyncBooksTask
def sync_all(last_sync_datetime \\ nil) do
{:ok, servers} = Metadata.list_dbi_server()
{:ok, servers} = Metadata.list_dbi_server(authorize?: false)
params = params(last_sync_datetime)