File: test_digest.c

package info (click to toggle)
raft 0.22.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,504 kB
  • sloc: ansic: 37,539; makefile: 264; sh: 77; python: 22
file content (14 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "../../include/raft.h"
#include "../lib/runner.h"

SUITE(raft_digest)

/* Generation of the ID of the bootstrap dqlite node. */
TEST(raft_digest, bootstrapServerId, NULL, NULL, 0, NULL)
{
    const char *address = "127.0.0.1:65536";
    unsigned long long id;
    id = raft_digest(address, 0);
    munit_assert_int(id, ==, 138882483);
    return MUNIT_OK;
}