test_fqnames.c revision 777374243e15c53e7b0a7345e190c1018920be18
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2013 Red Hat
SSSD tests: Fully Qualified Names 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 <popt.h>
#include "tests/cmocka/common_mock.h"
#define NAME "name"
#define DOMNAME "domname"
#define FLATNAME "flatname"
struct fqdn_test_ctx {
struct sss_domain_info *dom;
struct sss_names_ctx *nctx;
};
void fqdn_test_setup(void **state)
{
struct fqdn_test_ctx *test_ctx;
}
void fqdn_test_teardown(void **state)
{
struct fqdn_test_ctx);
return;
}
}
void test_default(void **state)
{
struct fqdn_test_ctx);
char *fqdn;
const int fqdn_size = 255;
return;
}
"(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
}
{
struct fqdn_test_ctx);
char *fqdn;
const int fqdn_size = 255;
return;
}
"(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
}
{
struct fqdn_test_ctx);
char *fqdn;
const int fqdn_size = 255;
return;
}
"(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
}
void test_flat_fallback(void **state)
{
struct fqdn_test_ctx);
char *fqdn;
const int fqdn_size = 255;
return;
}
"(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
/* If flat name is requested but does not exist, the code falls back to domain
* name
*/
}
void test_init_nouser(void **state)
{
struct fqdn_test_ctx);
return;
}
"(?P<name>[^@]+)@?(?P<domain>[^@]*$)",
/* Initialization with no user name must fail */
}
{
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;
}
}
/* Even though normally the tests should clean up after themselves
* they might not after a failed run. Remove the old db to be sure */
}