dbversion_test.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 2011, 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id$ */
/*! \file */
#include <config.h>
#include <atf-c.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include "dnstest.h"
static void
const char *cond)
{
atf_tc_pass();
exit(0);
}
static void
setup_db(void) {
}
static void
close_db(void) {
}
dns_db_detach(&db1);
}
}
dns_db_detach(&db2);
}
}
/*
* Individual unit tests
*/
static void
dns_dbversion_t *v = NULL;
setup_db();
atf_tc_fail("dns_db_attachversion did not assert");
ATF_REQUIRE_EQ(v, v1);
ATF_REQUIRE_EQ(v, NULL);
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
atf_tc_fail("dns_db_closeversion did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
dns_rdatatype_soa, 0, 0, NULL,
atf_tc_fail("dns_db_find did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
&iterator);
atf_tc_fail("dns_db_allrdatasets did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
atf_tc_fail("dns_db_findrdataset did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
dns_rdatatype_soa, 0);
atf_tc_fail("dns_db_deleterdataset did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
atf_tc_fail("dns_db_subtractrdataset did not assert");
close_db();
dns_test_end();
}
}
}
atf_tc_set_md_var(tc, "descr", "check dns_db_subtractrdataset aborts with mis-matching db/version");
}
}
static void
setup_db();
fclose(f);
atf_tc_fail("dns_db_dump did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
setup_db();
0, NULL);
atf_tc_fail("dns_db_adddataset did not assert");
close_db();
dns_test_end();
}
}
}
}
}
static void
unsigned char salt[DNS_NSEC3_SALTSIZE];
setup_db();
&salt_length);
atf_tc_fail("dns_db_dump did not assert");
close_db();
dns_test_end();
}
}
}
atf_tc_set_md_var(tc, "descr", "check dns_db_getnsec3parameters aborts with mis-matching db/version");
}
}
static void
isc_buffer_t b;
unsigned char buf[1024];
setup_db();
/*
* Create a dummy RRSIG record and set a resigning time.
*/
rrsig.originalttl = 0;
rrsig.timesigned = 0;
dns_rdatatype_rrsig, &rrsig, &b);
atf_tc_fail("dns_db_resigned did not assert");
close_db();
dns_test_end();
}
}
}
}
}
/*
* Main
*/
ATF_TP_ADD_TCS(tp) {
return (atf_no_error());
}