/*
Authors:
Sumit Bose <sbose@redhat.com>
Copyright (C) 2014 Red Hat
SSSD tests: Tests ccache utilities
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 <stdio.h>
#include <popt.h>
#include "util/sss_krb5.h"
#include "providers/krb5/krb5_common.h"
#include "providers/krb5/krb5_ccache.h"
#include "tests/cmocka/common_mock.h"
struct ccache_test_ctx {
const char *ccache_file_name;
};
{
krb5_authdata *a;
&addr,
NULL,
};
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_non_null(a);
a->magic = KV5M_AUTHDATA;
assert_non_null(a->contents);
a->contents[0]=5;
a->length = 1;
test_creds.authdata[0] = a;
&ccache);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
return 0;
}
{
int ret;
struct ccache_test_ctx);
assert_int_equal(ret, 0);
return 0;
}
{
char *mem_ccache_name;
struct ccache_test_ctx);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
assert_int_equal(kerr, 0);
}
{
int opt;
int rv;
};
};
/* 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 */
return rv;
}