File: sync_connect.c

package info (click to toggle)
libmongo-client 0.1.5-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,256 kB
  • sloc: ansic: 13,795; makefile: 297; perl: 137; sh: 41
file content (22 lines) | stat: -rw-r--r-- 471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "test.h"
#include "mongo.h"

void
test_mongo_sync_connect (void)
{
  mongo_sync_connection *c;

  ok (mongo_sync_connect (NULL, 27017, FALSE) == NULL,
      "mongo_sync_connect() fails with a NULL host");

  begin_network_tests (1);

  ok ((c = mongo_sync_connect (config.primary_host,
			       config.primary_port, FALSE)) != NULL,
      "mongo_sync_connect() works");
  mongo_sync_disconnect (c);

  end_network_tests ();
}

RUN_TEST (2, mongo_sync_connect);