blob: 418c2bf0afc7c2ec2014f49aba79fea6635bda4c (
plain)
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);
|