Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yngvar-antonsson committed Apr 10, 2024
1 parent 4da18b1 commit 0eb060d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/integration/failover_stateful_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -814,4 +814,26 @@ for group, uri in pairs(test_cases) do
end
end

add('test_disable', function(g)
t.assert_equals(g.client:get_session():get_leaders(),
{
[router_uuid] = router_1_uuid,
[storage_uuid] = storage_1_uuid,
})

g.cluster.main_server:exec(function(uuid)
require('cartridge.lua-api.topology').disable_servers({uuid})
end, {storage_1_uuid})

t.helpers.retrying({timeout = 20}, function()
t.assert_equals(g.client:get_session():get_leaders(),
{
[router_uuid] = router_1_uuid,
[storage_uuid] = storage_2_uuid,
})
end)

g.cluster.main_server:exec(function(uuid)
require('cartridge.lua-api.topology').enable_servers({uuid})
end, {storage_1_uuid})
end)

0 comments on commit 0eb060d

Please sign in to comment.