BIND 10 #143: auth test: what(): Cannot open Sqlite3 database file: testdata/test.sqlite3

BIND 10 Development do-not-reply at isc.org
Thu Apr 15 17:38:41 UTC 2010


#143: auth test:   what():  Cannot open Sqlite3 database file:
testdata/test.sqlite3
--------------------------+-------------------------------------------------
 Reporter:  jreed         |        Owner:  jreed   
     Type:  defect        |       Status:  assigned
 Priority:  major         |    Milestone:          
Component:  Unclassified  |   Resolution:          
 Keywords:                |    Sensitive:  0       
--------------------------+-------------------------------------------------

Comment(by jreed):

 I added the extra file to EXTRA_DIST and then realized it was not in the
 src in the first place. (My tests worked because I was using unclean
 source.)

 Does this look okay? (I tested it.)

 {{{

 Index: src/lib/auth/tests/sqlite3_unittest.cc
 ===================================================================
 --- src/lib/auth/tests/sqlite3_unittest.cc      (revision 1713)
 +++ src/lib/auth/tests/sqlite3_unittest.cc      (working copy)
 @@ -45,8 +45,9 @@
  namespace {
  ElementPtr SQLITE_DBFILE_EXAMPLE = Element::createFromString(
      "{ \"database_file\": \"" TEST_DATA_DIR "/test.sqlite3\"}");
 +// SQLITE_DBFILE_EXAMPLE2 is created, so is not in TEST_DATA_DIR
  ElementPtr SQLITE_DBFILE_EXAMPLE2 = Element::createFromString(
 -    "{ \"database_file\": \"" TEST_DATA_DIR "/test2.sqlite3\"}");
 +    "{ \"database_file\": \"test2.sqlite3\"}");
  ElementPtr SQLITE_DBFILE_EXAMPLE_ROOT = Element::createFromString(
      "{ \"database_file\": \"" TEST_DATA_DIR "/test-root.sqlite3\"}");
  ElementPtr SQLITE_DBFILE_BROKENDB = Element::createFromString(
 Index: src/lib/auth/tests/Makefile.am
 ===================================================================
 --- src/lib/auth/tests/Makefile.am      (revision 1714)
 +++ src/lib/auth/tests/Makefile.am      (working copy)
 @@ -2,7 +2,7 @@
  AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/lib/dns
  AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(srcdir)/testdata\"

 -CLEANFILES = *.gcno *.gcda
 +CLEANFILES = *.gcno *.gcda test2.sqlite3

  TESTS =
  if HAVE_GTEST
 @@ -59,4 +59,3 @@
  EXTRA_DIST += testdata/sql2.example.com.signed
  EXTRA_DIST += testdata/test-root.sqlite3
  EXTRA_DIST += testdata/test.sqlite3
 -EXTRA_DIST += testdata/test2.sqlite3

 }}}


 Note I do not use "testdata/" like it was before because that testdata/
 directory does not exist in the builddir.

-- 
Ticket URL: <https://bind10.isc.org/ticket/143#comment:2>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list