nim-raft/tests/test_consensus_state_machine.nim

19 lines
641 B
Nim
Raw Normal View History

2023-11-05 01:22:33 +02: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 18:29:28 +02:00
import basic_state_machine
2023-11-05 01:22:33 +02:00
import ../raft/consensus_state_machine
2023-11-05 18:29:28 +02:00
import ../raft/types
2023-11-05 01:22:33 +02:00
suite "Create and test Consensus State Machine":
2023-11-05 06:42:19 +02:00
test "Create Consensus State Machine":
2023-11-05 18:29:28 +02:00
let csm = ConsensusFsm[RaftNodeState, EventType, RaftNode[SmState, SmCommand], RaftMessageBase].new()
2023-11-05 06:42:19 +02:00
check csm != nil