Skip to content

Commit

Permalink
Update DatabaseRestored and DatabaseInstanceRegistered events order
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed Aug 1, 2023
1 parent 0a065fc commit 75e0166
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions lib/trento/domain/sap_system/sap_system.ex
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,6 @@ defmodule Trento.Domain.SapSystem do
)
when not is_nil(deregistered_at) do
[
%DatabaseRestored{
sap_system_id: sap_system_id,
health: health
},
%DatabaseInstanceRegistered{
sap_system_id: sap_system_id,
sid: sid,
Expand All @@ -213,6 +209,10 @@ defmodule Trento.Domain.SapSystem do
system_replication: system_replication,
system_replication_status: system_replication_status,
health: health
},
%DatabaseRestored{
sap_system_id: sap_system_id,
health: health
}
]
end
Expand Down
32 changes: 16 additions & 16 deletions test/trento/domain/sap_system/sap_system_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,10 +2001,6 @@ defmodule Trento.SapSystemTest do
initial_events,
command,
[
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
},
%DatabaseInstanceRegistered{
sap_system_id: sap_system_id,
sid: db_sid,
Expand All @@ -2019,6 +2015,10 @@ defmodule Trento.SapSystemTest do
system_replication: command.system_replication,
system_replication_status: command.system_replication_status,
health: command.health
},
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
}
],
fn sap_system ->
Expand Down Expand Up @@ -2138,10 +2138,6 @@ defmodule Trento.SapSystemTest do
initial_events,
command,
[
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
},
%DatabaseInstanceRegistered{
sap_system_id: sap_system_id,
sid: db_sid,
Expand All @@ -2156,6 +2152,10 @@ defmodule Trento.SapSystemTest do
system_replication: command.system_replication,
system_replication_status: command.system_replication_status,
health: command.health
},
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
}
],
fn sap_system ->
Expand Down Expand Up @@ -2277,10 +2277,6 @@ defmodule Trento.SapSystemTest do
initial_events,
command,
[
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
},
%DatabaseInstanceRegistered{
sap_system_id: sap_system_id,
sid: db_sid,
Expand All @@ -2295,6 +2291,10 @@ defmodule Trento.SapSystemTest do
system_replication: command.system_replication,
system_replication_status: command.system_replication_status,
health: command.health
},
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
}
],
fn sap_system ->
Expand Down Expand Up @@ -2410,10 +2410,6 @@ defmodule Trento.SapSystemTest do
initial_events,
command,
[
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
},
%DatabaseInstanceRegistered{
sap_system_id: sap_system_id,
sid: db_sid,
Expand All @@ -2428,6 +2424,10 @@ defmodule Trento.SapSystemTest do
system_replication: command.system_replication,
system_replication_status: command.system_replication_status,
health: command.health
},
%DatabaseRestored{
sap_system_id: sap_system_id,
health: command.health
}
],
fn sap_system ->
Expand Down

0 comments on commit 75e0166

Please sign in to comment.