Remove CPANPLUS's SQLite tests from the core.
authorCraig A. Berry <craigberry@mac.com>
Thu, 18 Jun 2009 03:08:28 +0000 (22:08 -0500)
committerDavid Mitchell <davem@iabyn.com>
Tue, 23 Jun 2009 22:12:53 +0000 (23:12 +0100)
They will never be run here in the absence of DBD::SQLite, and the
absurdly long names can cause trouble for venerable but now exotic
volume formats such as ODS-2 or FAT.

(cherry picked from commit 906a0c07e328f0f22fcc032cc5b85bf246005a45)

MANIFEST
Porting/Maintainers.pl
lib/CPANPLUS/t/031_CPANPLUS-Internals-Source-SQLite.t [deleted file]
lib/CPANPLUS/t/032_CPANPLUS-Internals-Source-via-sqlite.t [deleted file]

index c0dad6d..19928a6 100755 (executable)
--- a/MANIFEST
+++ b/MANIFEST
@@ -2022,8 +2022,6 @@ lib/CPANPLUS/Shell.pm     CPANPLUS
 lib/CPANPLUS/t/00_CPANPLUS-Internals-Utils.t   CPANPLUS tests
 lib/CPANPLUS/t/01_CPANPLUS-Configure.t CPANPLUS tests
 lib/CPANPLUS/t/02_CPANPLUS-Internals.t CPANPLUS tests
-lib/CPANPLUS/t/031_CPANPLUS-Internals-Source-SQLite.t  CPANPLUS tests
-lib/CPANPLUS/t/032_CPANPLUS-Internals-Source-via-sqlite.t      CPANPLUS tests
 lib/CPANPLUS/t/03_CPANPLUS-Internals-Source.t  CPANPLUS tests
 lib/CPANPLUS/t/04_CPANPLUS-Module.t    CPANPLUS tests
 lib/CPANPLUS/t/05_CPANPLUS-Internals-Fetch.t   CPANPLUS tests
index 4c4be36..0d553da 100644 (file)
@@ -419,6 +419,8 @@ package Maintainers;
        'EXCLUDED'      => [ qr{^inc/},
                             qr{^t/dummy-.*\.hidden$},
                             qw{ bin/cpanp-boxed
+                                t/031_CPANPLUS-Internals-Source-SQLite.t
+                                t/032_CPANPLUS-Internals-Source-via-sqlite.t
                               },
                           ],
        'CPAN'          => 1,
diff --git a/lib/CPANPLUS/t/031_CPANPLUS-Internals-Source-SQLite.t b/lib/CPANPLUS/t/031_CPANPLUS-Internals-Source-SQLite.t
deleted file mode 100644 (file)
index 730e04b..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-### make sure we can find our conf.pl file
-BEGIN { 
-    use FindBin; 
-    require "$FindBin::Bin/inc/conf.pl";
-}
-
-use strict;
-
-use Module::Load;
-use Test::More eval { load 'CPANPLUS::Internals::Source::SQLite'; 1 }
-            ? 'no_plan'
-            : (skip_all => "SQLite engine not available");
-
-use Data::Dumper;
-use File::Basename qw[dirname];
-use CPANPLUS::Error;
-use CPANPLUS::Backend;
-use CPANPLUS::Internals::Constants;
-
-my $conf = gimme_conf();
-
-### make sure we use the SQLite engine
-$conf->set_conf( source_engine => 'CPANPLUS::Internals::Source::SQLite' );
-
-my $cb   = CPANPLUS::Backend->new( $conf );
-my $mod  = TEST_CONF_MODULE;
-my $auth = TEST_CONF_AUTHOR;
-
-ok( $cb->reload_indices( update_source => 1 ),                 
-                                "Building trees" );
-ok( $cb->__sqlite_dbh,          "   Got a DBH " );
-ok( $cb->__sqlite_file,         "   Got a DB file" );
-
-
-### make sure we have trees and they're hashes
-{   ok( $cb->author_tree,       "Got author tree" );
-    isa_ok( $cb->author_tree,   "HASH" );
-
-    ok( $cb->module_tree,       "Got module tree" );
-    isa_ok( $cb->module_tree,   "HASH" );
-}
-
-### save state, shouldn't work
-{   CPANPLUS::Error->flush;
-    my $rv = $cb->save_state;
-    
-    ok( !$rv,                   "Saving state not implemented" );
-    like( CPANPLUS::Error->stack_as_string, qr/not implemented/i,
-                                "   Diagnostics confirmed" );
-}
-
-### test look ups
-{   my %map = (
-        $auth   => 'author_tree',
-        $mod    => 'module_tree',
-    );
-    
-    while( my($str, $meth) = each %map ) {
-    
-        ok( $str,               "Trying to retrieve $str" );
-        ok( $cb->$meth( $str ), "   Got $str object via ->$meth" );
-        ok( $cb->$meth->{$str}, "   Got author object via ->{ $str }" );
-        ok( exists $cb->$meth->{ $str },
-                                "       Testing exists() " );   
-        ok( not(exists( $cb->$meth->{ $$ } )),
-                                "           And non-exists() " );
-        cmp_ok( scalar(keys(%{ $cb->$meth })), ">", 1,
-                                "   Got keys()" );
-                                
-        cmp_ok( scalar(keys(%{ $cb->$meth })), '==', scalar(keys(%{ $cb->$meth })),
-                                "   Keys == Values" );
-
-        while( my($key,$val) = each %{ $cb->$meth } ) {
-            ok( $key,           "   Retrieved $key via each()" );
-            ok( $val,           "       And value" );
-            ok( ref $val,       "           Value is a ref: $val" );
-            can_ok( $val,       '_id' );
-        }            
-    }
-}    
diff --git a/lib/CPANPLUS/t/032_CPANPLUS-Internals-Source-via-sqlite.t b/lib/CPANPLUS/t/032_CPANPLUS-Internals-Source-via-sqlite.t
deleted file mode 100644 (file)
index 46505f5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-use strict;
-use FindBin; 
-
-use Module::Load;
-
-local $ENV{CPANPLUS_SOURCE_ENGINE} = 'CPANPLUS::Internals::Source::SQLite';
-
-my $old = select STDERR; $|++;                                  
-select $old;             $|++;                                  
-my $rv = do("$FindBin::Bin/03_CPANPLUS-Internals-Source.t") or do {
-    die $@ if $@;
-    die $! if $!;
-};                                                  
-