/*
SSSD
Fail over tests.
Authors:
Martin Nagy <mnagy@redhat.com>
Copyright (C) Red Hat, Inc 2009
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <check.h>
#include <popt.h>
#include <stdlib.h>
#include <stdio.h>
#include <talloc.h>
#include <tevent.h>
#include "resolv/async_resolv.h"
#include "tests/common_check.h"
/* Interface under test */
#include "providers/fail_over.h"
int use_net_test;
struct test_ctx {
int tasks;
};
struct task {
const char *location;
int recv;
int port;
int new_server_status;
int new_port_status;
};
static struct test_ctx *
setup_test(void)
{
int ret;
fail("Could not init tevent context");
}
fail("Could not init resolv context");
}
fail("Could not init fail over context");
}
return ctx;
}
static void
{
}
{
int i;
int ret;
ctx = setup_test();
for (i = 0; i < 10; i++) {
}
for (i = 9; i >= 0; i--) {
}
}
static void
{
int port;
int i;
if (recv_status != EOK)
return;
if (task->new_port_status >= 0)
if (task->new_server_status >= 0)
}
}
}
}
#define get_request(a, b, c, d, e, f) \
_get_request(a, b, c, d, e, f, __location__)
static void
int new_server_status, const char *location)
{
}
{
ctx = setup_test();
/* Add service. */
/* Add servers. */
/* Make requests. */
}
Suite *
create_suite(void)
{
/* Do some testing */
if (use_net_test) {
}
/* Add all test cases to the test suite */
suite_add_tcase(s, tc);
return s;
}
int
{
int opt;
int failure_count;
{ "use-net-test", 'n', POPT_ARG_NONE, 0, 'n', "Run tests that need an active internet connection", NULL },
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
case 'n':
use_net_test = 1;
break;
default:
return 1;
}
}
suite = create_suite();
/* If CK_VERBOSITY is set, use that, otherwise it defaults to CK_NORMAL */
}