test_ad_common.c revision 72ae534f5aef6d2e5d3f2f51299aede5abf9687e
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2013 Red Hat
SSSD tests: AD access control filter tests
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 <talloc.h>
#include <tevent.h>
#include <errno.h>
#include <popt.h>
#include <unistd.h>
#include <ifaddrs.h>
/* In order to access opaque types */
#include "providers/ad/ad_common.c"
#include "tests/cmocka/common_mock.h"
#define DOMNAME "domname"
struct ad_common_test_ctx {
struct ad_id_ctx *subdom_ad_ctx;
struct sss_domain_info *dom;
struct sss_domain_info *subdom;
};
static void
ad_common_test_setup(void **state)
{
struct ad_common_test_ctx *test_ctx;
struct sdap_domain *sdom;
struct ad_id_ctx *subdom_ad_ctx;
struct sdap_id_conn_ctx *subdom_ldap_ctx;
struct sdap_options);
}
static void
ad_common_test_teardown(void **state)
{
struct ad_common_test_ctx);
}
char *default_primary,
char *default_realm,
const char *keytab_path)
{
/* Pretend SASL is fine */
return EOK;
}
void test_ldap_conn_list(void **state)
{
struct sdap_id_conn_ctx *conn;
struct ad_common_test_ctx);
}
void test_conn_list(void **state)
{
struct sdap_id_conn_ctx **conn_list;
struct ad_common_test_ctx);
/* If there is a fallback, we should ignore the offline mode */
}
{
int opt;
struct poptOption long_options[] = {
};
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}