~ubuntu-branches/ubuntu/precise/libmongo-client/precise

« back to all changes in this revision

Viewing changes to tests/unit/mongo/sync/sync_cmd_authenticate.c

  • Committer: Bazaar Package Importer
  • Author(s): Gergely Nagy
  • Date: 2011-07-01 11:08:57 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110701110857-vg8kjy3yhedv205r
Tags: 0.1.2-1
* New upstream release.
* Converted to multi-arch.
* Use DEP-5 format debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include <sys/socket.h>
7
7
#include "libmongo-private.h"
8
8
 
9
 
#if ENABLE_AUTH
10
9
void
11
10
test_mongo_sync_cmd_authenticate_net_secondary (void)
12
11
{
111
110
}
112
111
 
113
112
RUN_TEST (17, mongo_sync_cmd_authenticate);
114
 
#else
115
 
void
116
 
test_mongo_sync_cmd_authenticate  (void)
117
 
{
118
 
  errno = 0;
119
 
  if (mongo_sync_cmd_authenticate (NULL, NULL, NULL, NULL) != FALSE)
120
 
    fail ("mongo_sync_authenticate() with NULLs should fail");
121
 
  else
122
 
    ok (errno == ENOTSUP,
123
 
        "mongo_sync_authenticate() should fail with ENOTSUP "
124
 
        "when authentication is not compiled in");
125
 
}
126
 
 
127
 
RUN_TEST (1, mongo_sync_cmd_authenticate);
128
 
#endif