test_sysdb_utils.c revision 6cdeb0923c16e3fafe21aaadca6dac1d71474c31
/*
SSSD
sysdb_utils - Tests for various sysdb calls
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2015 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"
#define IPA_UUID "bcae7c40-97eb-11e4-88ca-525400e96a6b"
0x85, 0x74, 0x7d, 0xb0, 0x47, 0x7f, 0x96, 0x2e};
#define AD_GUID "fea80d8d-dbd5-4f84-8574-7db0477f962e"
static void test_sysdb_handle_original_uuid(void **state)
{
int ret;
struct sysdb_attrs *src_attrs;
struct sysdb_attrs *dest_attrs;
const char *guid;
"def");
dest_attrs, "def");
dest_attrs, "def");
dest_attrs, "def");
dest_attrs, "ghi");
/* check objectGUID with length other than 16 */
dest_attrs, "jkl");
}
#define TEST_BASE64_ABC "YWJj"
#define TEST_BASE64_123 "AQID"
static void test_sysdb_attrs_add_base64_blob(void **state)
{
struct sysdb_attrs *attrs;
struct ldb_message_element *el;
int ret;
}
{
int rv;
int opt;
struct poptOption long_options[] = {
};
const struct CMUnitTest tests[] = {
};
/* Set debug level to invalid value so we can deside if -d 0 was used. */
switch(opt) {
default:
return 1;
}
}
return rv;
}