/*
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2014 Red Hat
SSSD tests: Unit tests for id-mapping in the IPA provider
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 <popt.h>
#include "tests/cmocka/common_mock.h"
#include "lib/idmap/sss_idmap.h"
#include "providers/ipa/ipa_common.h"
#include "providers/ldap/sdap_idmap.h"
{
char *dom_name;
char *sid;
bool external_mapping;
size_t c;
struct test_data {
struct range_info r;
char *exp_dom_name;
char *exp_sid;
bool exp_external_mapping;
} d[] = {
/* working IPA_RANGE_LOCAL range */
/* working old-style IPA_RANGE_LOCAL range without range type */
/* old-style IPA_RANGE_LOCAL without SID and secondary base rid */
/* old-style range with SID and secondary base rid */
DOMAIN_SID, NULL},
/* working IPA_RANGE_AD_TRUST range */
/* working old-style IPA_RANGE_AD_TRUST range without range type */
/* working IPA_RANGE_AD_TRUST_POSIX range */
};
for (c = 0; d[c].exp_dom_name != NULL; c++) {
} else {
}
}
}
struct range_info ***range_list)
{
sss_mock_ptr_type(struct range_info **));
return EOK;
}
struct test_ctx {
};
{
range_list[0]->secondary_base_rid = 0;
return range_list;
}
{
int ret;
struct sdap_id_ctx);
struct be_ctx);
struct sss_domain_info);
return 0;
}
{
return 0;
}
{
int ret;
DOMAIN_NAME, DOMAIN_SID, true);
DOMAIN_NAME, DOMAIN_SID, false);
}
{
int opt;
};
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
}