Skip to content
Snippets Groups Projects
Verified Commit 19f1f622 authored by Yaroslav Dynnikov's avatar Yaroslav Dynnikov
Browse files

test: employ instance_uuid in pytest

parent 4aba385d
No related branches found
No related tags found
1 merge request!107test: employ instance_uuid in pytest
Pipeline #4977 passed
......@@ -78,6 +78,29 @@ def test_request_follower(cluster2: Cluster):
assert e.value.args == ("ER_PROC_C", "not a leader")
def test_instance_uuid(cluster2: Cluster):
i1, i2 = cluster2.instances
i1.assert_raft_status("Leader")
ret = i1.call(
".raft_join",
i2.instance_id,
None, # replicaset_id
i2.listen, # address
True, # voter
)[0]["peer"]
assert ret["instance_id"] == i2.instance_id
assert ret["instance_uuid"] == i2.eval("return box.info.uuid")
# Two consequent requests must obtain same raft_id and instance_id
ret1 = fake_join(i1, "fake", timeout=1)[0]["peer"]
ret2 = fake_join(i1, "fake", timeout=1)[0]["peer"]
assert ret1["instance_id"] == "fake"
assert ret2["instance_id"] == "fake"
assert ret1["raft_id"] == ret2["raft_id"]
assert ret1["instance_uuid"] == ret2["instance_uuid"]
def test_discovery(cluster: Cluster):
cluster.deploy(instance_count=3)
i1, i2, i3 = cluster.instances
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment