From 906d9165a3b8759fe99a9e855ccd17441deb26fd Mon Sep 17 00:00:00 2001
From: Georgy Moshkin <gmoshkin@picodata.io>
Date: Wed, 16 Nov 2022 14:18:52 +0300
Subject: [PATCH] refactor: display ConfChangeType as is

---
 src/traft/mod.rs        | 6 +++---
 test/int/test_basics.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/traft/mod.rs b/src/traft/mod.rs
index ac5346f1f6..108275b2f8 100644
--- a/src/traft/mod.rs
+++ b/src/traft/mod.rs
@@ -676,9 +676,9 @@ impl<'a> std::fmt::Display for EntryPayload<'a> {
 
         const fn change_type(ct: raft::ConfChangeType) -> &'static str {
             match ct {
-                raft::ConfChangeType::AddNode => "Promote",
-                raft::ConfChangeType::AddLearnerNode => "Demote",
-                raft::ConfChangeType::RemoveNode => "Remove",
+                raft::ConfChangeType::AddNode => "AddNode",
+                raft::ConfChangeType::AddLearnerNode => "AddLearnerNode",
+                raft::ConfChangeType::RemoveNode => "RemoveNode",
             }
         }
     }
diff --git a/test/int/test_basics.py b/test/int/test_basics.py
index b83db73668..048f3ac66a 100644
--- a/test/int/test_basics.py
+++ b/test/int/test_basics.py
@@ -220,7 +220,7 @@ def test_raft_log(instance: Instance):
 |  1  | 1  |1.0.1|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, Offline(0), 1, {b})|
 |  2  | 1  |1.0.2|Insert(cluster_state, ["replication_factor",1])|
 |  3  | 1  |1.0.3|Insert(cluster_state, ["desired_schema_version",0])|
-|  4  | 1  |     |Promote(1)|
+|  4  | 1  |     |AddNode(1)|
 |  5  | 2  |     |-|
 |  6  | 2  |1.1.2|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, Offline(0) -> Online(1), 6, {b})|
 |  7  | 2  |1.1.3|PersistPeer(i1, 1, r1, 127.0.0.1:{p}, RaftSynced(1) -> Online(1), 7, {b})|
-- 
GitLab