/*
Authors:
Pavel Reichl <preichl@redhat.com>
Copyright (C) 2015 Red Hat
SSSD tests - id cleanup
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 <stdlib.h>
#include <stddef.h>
#include <setjmp.h>
#include <unistd.h>
#include <cmocka.h>
#include <popt.h>
#include "tests/cmocka/common_mock.h"
#include "providers/ldap/ldap_auth.h"
#include "tests/cmocka/test_expire_common.h"
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/ldap_opts.h"
#include "providers/ipa/ipa_opts.h"
struct sysdb_test_ctx {
};
{
char *conf_db;
int ret;
/* Create tests directory if it doesn't exist */
/* (relative to current dir) */
/* Create an event context
* It will not be used except in confdb_init and sysdb_init
*/
/* Connect to the conf db */
val[0] = "LOCAL";
val[0] = "local";
val[0] = "TRUE";
return EOK;
}
{
int ret;
/* set options */
return 0;
}
{
struct sysdb_test_ctx);
return 0;
}
struct sss_domain_info *domain,
const char *name)
{
if (sys_attrs) {
SYSDB_CACHE_EXPIRE, 1);
} else {
"Could not add expiration time to attributes\n");
}
} else {
}
return ret;
}
{
char *special_grp;
char *empty_special_grp;
char *empty_grp;
char *grp;
char *test_user;
char *test_user2;
/* This timeout can be bigger because we will call invalidate_group
* to expire entries without waiting. */
struct sysdb_test_ctx);
"special_gr*o/u\\p(2016)",
"empty_gr*o/u\\p(2016)",
10001, 10002, "Test user",
0, 0);
10002, 10004, "Test user",
0, 0);
/* not expired */
/* let records to expire */
}
{
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;
}