/*
SSSD
sysdb_certmap - Tests for sysdb certmap related calls
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2017 Red Hat
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 <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <popt.h>
#include "tests/cmocka/common_mock.h"
struct certmap_test_ctx {
};
{
};
struct certmap_test_ctx);
return 0;
}
{
return 0;
}
{
int ret;
bool user_name_hint;
struct certmap_test_ctx);
}
{
size_t d;
assert_non_null(r);
assert_non_null(m);
assert_null(m->map_rule);
} else {
}
if (r->match_rule == NULL) {
assert_null(m->match_rule);
} else {
}
assert_non_null(m->domains);
assert_null(m->domains[0]);
} else {
for (d = 0; r->domains[d]; d++) {
assert_non_null(m->domains[d]);
true));
}
}
}
{
int ret;
struct certmap_info map_a = { discard_const("map_a"), 11, discard_const("abc"), discard_const("def"), NULL };
struct certmap_info map_b = { discard_const("map_b"), UINT_MAX, discard_const("abc"), NULL, domains };
struct certmap_test_ctx);
bool user_name_hint;
assert_non_null(certmap[0]);
assert_non_null(certmap[0]);
assert_non_null(certmap[0]);
} else {
}
}
{
int rv;
int no_cleanup = 0;
int opt;
_("Do not delete the test database after a test run"), NULL },
};
};
/* Set debug level to invalid value so we can decide if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
if (rv == 0 && no_cleanup == 0) {
}
return rv;
}