2023-11-04 23:22:33 +00:00
|
|
|
# nim-raft
|
|
|
|
# Copyright (c) 2023 Status Research & Development GmbH
|
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
# at your option.
|
|
|
|
# This file may not be copied, modified, or distributed except according to
|
|
|
|
# those terms.
|
|
|
|
|
|
|
|
import unittest2
|
2023-11-05 16:29:28 +00:00
|
|
|
import basic_state_machine
|
2023-11-04 23:22:33 +00:00
|
|
|
import ../raft/consensus_state_machine
|
2023-11-05 16:29:28 +00:00
|
|
|
import ../raft/types
|
2023-11-04 23:22:33 +00:00
|
|
|
|
|
|
|
suite "Create and test Consensus State Machine":
|
|
|
|
|
2023-11-05 04:42:19 +00:00
|
|
|
test "Create Consensus State Machine":
|
2023-11-05 16:29:28 +00:00
|
|
|
let csm = ConsensusFsm[RaftNodeState, EventType, RaftNode[SmState, SmCommand], RaftMessageBase].new()
|
2023-11-05 04:42:19 +00:00
|
|
|
check csm != nil
|