示例#1
0
void
test_journald_mock()
{
  Journald *journald = journald_mock_new();
  gint result = journald_open(journald, 0);

  assert_gint(result, 0, ASSERTION_ERROR("Can't open journald mock"));

  __test_seeks(journald);

  __test_cursors(journald);

  __test_fd_handling(journald);

  journald_close(journald);
  journald_free(journald);
}
示例#2
0
Test(systemd_journal, test_journald_mock)
{
  const gchar *persist_file = "test_systemd_journal3.persist";

  _init_cfg_with_persist_file(persist_file);

  Journald *journald = journald_mock_new();
  gint result = journald_open(journald, 0);

  cr_assert_eq(result, 0, "%s", "Can't open journald mock");

  __test_seeks(journald);

  __test_cursors(journald);

  __test_fd_handling(journald);

  journald_close(journald);
  journald_free(journald);

  _deinit_cfg(persist_file);
}