Code

rearrangement of test directory
authorrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Oct 2009 09:14:49 +0000 (09:14 +0000)
committerrettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Oct 2009 09:14:49 +0000 (09:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14666 594d385d-05f5-0310-b6e9-bd551577e9d8

43 files changed:
gosa-si/tests/client.php
gosa-si/tests/db-check-clients.pl [deleted file]
gosa-si/tests/db-check-fai-release.pl [deleted file]
gosa-si/tests/db-check-fai-server.pl [deleted file]
gosa-si/tests/db-check-foreign-clients.pl [deleted file]
gosa-si/tests/db-check-incoming.pl [deleted file]
gosa-si/tests/db-check-jobs.pl [deleted file]
gosa-si/tests/db-check-messaging.pl [deleted file]
gosa-si/tests/db-check-packages-list.pl [deleted file]
gosa-si/tests/db-check-server.pl [deleted file]
gosa-si/tests/db-check-users.pl [deleted file]
gosa-si/tests/db/db-check-clients.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-fai-release.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-fai-server.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-foreign-clients.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-incoming.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-jobs.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-messaging.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-packages-list.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-server.pl [new file with mode: 0755]
gosa-si/tests/db/db-check-users.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-clients.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-concurrency.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-fai-release.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-fai-server.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-foreign-clients.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-incoming.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-jobs.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-messaging.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-packages-list.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-server.pl [new file with mode: 0755]
gosa-si/tests/db/sqlite-check-users.pl [new file with mode: 0755]
gosa-si/tests/sqlite-check-clients.pl [deleted file]
gosa-si/tests/sqlite-check-concurrency.pl [deleted file]
gosa-si/tests/sqlite-check-fai-release.pl [deleted file]
gosa-si/tests/sqlite-check-fai-server.pl [deleted file]
gosa-si/tests/sqlite-check-foreign-clients.pl [deleted file]
gosa-si/tests/sqlite-check-incoming.pl [deleted file]
gosa-si/tests/sqlite-check-jobs.pl [deleted file]
gosa-si/tests/sqlite-check-messaging.pl [deleted file]
gosa-si/tests/sqlite-check-packages-list.pl [deleted file]
gosa-si/tests/sqlite-check-server.pl [deleted file]
gosa-si/tests/sqlite-check-users.pl [deleted file]

index c9fde5ffd69d4df0cff694f9f6ee93f258972a89..c1c21443bbcad13e631dcd916a5512f982c02e82 100755 (executable)
@@ -49,7 +49,7 @@ for($count = 1; $count <= $zahl; $count++)
        #$data = "<xml><header>gosa_opsi_getSoftwareLicenseUsages</header><source>GOSA</source><target>00:01:6C:9D:B9:FA</target><hostId>krakenarme.intranet.gonicus.de</hostId></xml>";
        #$data = "<xml><header>gosa_opsi_getSoftwareLicenseUsages</header><source>GOSA</source><target>00:01:6C:9D:B9:FA</target><licensePoolId>LicensePool</licensePoolId></xml>";
        #$data = "<xml><header>gosa_opsi_getSoftwareLicenseUsages</header><source>GOSA</source><target>00:01:6C:9D:B9:FA</target></xml>";
-       #$data = "<xml><header>gosa_opsi_getSoftwareLicenseUsagesForProductId</header><source>GOSA</source><target>00:01:6C:9D:B9:FA</target><productId>firefox</productId></xml>";
+       $data = "<xml><header>gosa_opsi_getSoftwareLicenseUsagesForProductId</header><source>GOSA</source><target>00:01:6C:9D:B9:FA</target><productId>firefox</productId></xml>";
 
        #$data = "<xml><header>gosa_opsi_getSoftwareLicense_hash</header><source>GOSA</source><target>00:01:6C:9D:B9:FA</target><softwareLicenseId>l_2009-09-22_09:50:58_0</softwareLicenseId></xml>";
 
@@ -114,7 +114,7 @@ for($count = 1; $count <= $zahl; $count++)
     # trigger jobs at client
     #$data = "<xml> <header>gosa_trigger_goto_settings_reload</header> <target>00:01:6c:9d:b9:fa</target> <source>GOSA</source> </xml>";
     #$data = "<xml> <header>gosa_detect_hardware</header> <target>00:0C:29:4C:4B:0C</target> <source>GOSA</source> </xml>";
-    $data = "<xml> <header>gosa_new_key_for_client</header> <target>$mac</target> <source>GOSA</source> <macaddress>$mac</macaddress></xml>";
+    #$data = "<xml> <header>gosa_new_key_for_client</header> <target>$mac</target> <source>GOSA</source> <macaddress>$mac</macaddress></xml>";
     #$data = "<xml> <header>gosa_trigger_action_wake</header> <target>00:0C:29:4C:4B:0C</target> <source>GOSA</source></xml>";
     #$data = "<xml> <header>gosa_trigger_action_faireboot</header> <target>00:0C:29:4C:4B:0C</target> <source>GOSA</source> </xml>";
     #$data = "<xml> <header>gosa_trigger_action_reboot</header> <target>00:0C:29:4C:4B:0C</target> <source>GOSA</source> </xml>";
diff --git a/gosa-si/tests/db-check-clients.pl b/gosa-si/tests/db-check-clients.pl
deleted file mode 100755 (executable)
index e302746..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "known_clients";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-fai-release.pl b/gosa-si/tests/db-check-fai-release.pl
deleted file mode 100755 (executable)
index ac4503d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "fai_release";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-fai-server.pl b/gosa-si/tests/db-check-fai-server.pl
deleted file mode 100755 (executable)
index 1d6add4..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "fai_server";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-foreign-clients.pl b/gosa-si/tests/db-check-foreign-clients.pl
deleted file mode 100755 (executable)
index 95c420c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "foreign_clients";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-incoming.pl b/gosa-si/tests/db-check-incoming.pl
deleted file mode 100755 (executable)
index 014b22c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "incoming";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-jobs.pl b/gosa-si/tests/db-check-jobs.pl
deleted file mode 100755 (executable)
index 5ecbe49..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "jobs";
-    
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-messaging.pl b/gosa-si/tests/db-check-messaging.pl
deleted file mode 100755 (executable)
index 08e4528..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "messaging";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-packages-list.pl b/gosa-si/tests/db-check-packages-list.pl
deleted file mode 100755 (executable)
index e99c5e0..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  sqlite_check_packages_list.pl
-#
-#        USAGE:  ./sqlite_check_packages_list.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  28.02.2008 11:09:15 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "packages_list";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-server.pl b/gosa-si/tests/db-check-server.pl
deleted file mode 100755 (executable)
index f0caeca..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "known_server";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db-check-users.pl b/gosa-si/tests/db-check-users.pl
deleted file mode 100755 (executable)
index c86be7c..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBmysql;
-use Data::Dumper;
-
-print "START\n";
-my $table_name = "login_users";
-
-print "\n############################################################\n";
-print "$table_name\n";
-
-my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
-
-my $col_names = $dbh->get_table_columns($table_name);
-print join(', ', @{ $col_names } )."\n" ;
-
-my $answer = $dbh->show_table($table_name);
-print $answer."\n";
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-clients.pl b/gosa-si/tests/db/db-check-clients.pl
new file mode 100755 (executable)
index 0000000..e302746
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "known_clients";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-fai-release.pl b/gosa-si/tests/db/db-check-fai-release.pl
new file mode 100755 (executable)
index 0000000..ac4503d
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "fai_release";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-fai-server.pl b/gosa-si/tests/db/db-check-fai-server.pl
new file mode 100755 (executable)
index 0000000..1d6add4
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "fai_server";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-foreign-clients.pl b/gosa-si/tests/db/db-check-foreign-clients.pl
new file mode 100755 (executable)
index 0000000..95c420c
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "foreign_clients";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-incoming.pl b/gosa-si/tests/db/db-check-incoming.pl
new file mode 100755 (executable)
index 0000000..014b22c
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "incoming";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-jobs.pl b/gosa-si/tests/db/db-check-jobs.pl
new file mode 100755 (executable)
index 0000000..5ecbe49
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "jobs";
+    
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-messaging.pl b/gosa-si/tests/db/db-check-messaging.pl
new file mode 100755 (executable)
index 0000000..08e4528
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "messaging";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-packages-list.pl b/gosa-si/tests/db/db-check-packages-list.pl
new file mode 100755 (executable)
index 0000000..e99c5e0
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  sqlite_check_packages_list.pl
+#
+#        USAGE:  ./sqlite_check_packages_list.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  28.02.2008 11:09:15 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "packages_list";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-server.pl b/gosa-si/tests/db/db-check-server.pl
new file mode 100755 (executable)
index 0000000..f0caeca
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "known_server";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/db-check-users.pl b/gosa-si/tests/db/db-check-users.pl
new file mode 100755 (executable)
index 0000000..c86be7c
--- /dev/null
@@ -0,0 +1,41 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBmysql;
+use Data::Dumper;
+
+print "START\n";
+my $table_name = "login_users";
+
+print "\n############################################################\n";
+print "$table_name\n";
+
+my $dbh = GOSA::DBmysql->new('gosa_si', '127.0.0.1', 'gosa_si', 'gosa');
+
+my $col_names = $dbh->get_table_columns($table_name);
+print join(', ', @{ $col_names } )."\n" ;
+
+my $answer = $dbh->show_table($table_name);
+print $answer."\n";
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-clients.pl b/gosa-si/tests/db/sqlite-check-clients.pl
new file mode 100755 (executable)
index 0000000..218c913
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+print "START\n";
+my $res;
+my $db_name;
+
+sub daemon_log {}
+
+$db_name = "/var/lib/gosa-si/clients.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "known_clients";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-concurrency.pl b/gosa-si/tests/db/sqlite-check-concurrency.pl
new file mode 100755 (executable)
index 0000000..ece1a35
--- /dev/null
@@ -0,0 +1,96 @@
+#!/usr/bin/perl -W
+
+package GOSA::DBsqlite;
+use strict;
+use warnings;
+
+use DBI;
+use Data::Dumper;
+use Time::HiRes qw(usleep);
+use Fcntl ':flock';
+use threads;
+
+
+sub daemon_log {}
+
+my %threads;
+# Count of threads, if > 1 it corrupts the db
+my $count= 10;
+my $db_name= "./test.sqlite";
+my $lock = $db_name.".si.lock";
+
+#if(stat($lock)) {
+#      unlink($lock);
+#}
+#
+#if(stat($db_name)) {
+#      unlink($db_name)
+#}
+
+for(my $i=0;$i<$count;$i++) {
+       $threads{$i}= threads->create(\&check_database);
+}
+
+foreach my $thread (threads->list()) {
+       $thread->join();
+}
+
+sub check_database {
+       $threads{threads->self->tid()}= GOSA::DBsqlite->new($db_name);
+       threads->yield();
+       $threads{threads->self->tid()}->run_test("test");
+
+       return;
+}
+
+sub new {
+       my $class = shift;
+       my $db_name = shift;
+
+       my $self = {dbh=>undef,db_name=>undef,db_lock=>undef,db_lock_handle=>undef};
+       my $dbh = DBI->connect("dbi:SQLite:dbname=$db_name", "", "", {RaiseError => 1, AutoCommit => 1});
+       $self->{dbh} = $dbh;
+       $self->{db_name} = $db_name;
+       $self->{db_lock} = $lock;
+       bless($self,$class);
+       return($self);
+}
+
+sub lock {
+       my $self = shift;
+       open($self->{db_lock_handle}, ">>".($self->{db_lock})) unless ref $self->{db_lock_handle};
+       flock($self->{db_lock_handle},LOCK_EX);
+       seek($self->{db_lock_handle}, 0, 2);
+}
+
+
+sub unlock {
+       my $self = shift;
+       flock($self->{db_lock_handle},LOCK_UN);
+}
+
+sub run_test {
+       my $self= shift;
+       my $table_name= shift;
+       my $sql= "CREATE TABLE IF NOT EXISTS $table_name (id INTEGER PRIMARY KEY, status VARCHAR(255) DEFAULT 'none')";
+       $self->lock();
+       eval {
+               $self->{dbh}->do($sql);
+       };
+       if($@) {
+               print STDERR Dumper($@);
+       }
+       $self->unlock();
+
+       for(my $i=0;$i<100;$i++) {
+               $sql= "INSERT INTO $table_name (id, status) VALUES (null, 'test $i')";
+               $self->lock();
+               eval {
+                       $self->{dbh}->do($sql);
+               };
+               if($@) {
+                       print STDERR Dumper($@);
+               }
+               $self->unlock();
+       }
+}
diff --git a/gosa-si/tests/db/sqlite-check-fai-release.pl b/gosa-si/tests/db/sqlite-check-fai-release.pl
new file mode 100755 (executable)
index 0000000..df90a7b
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+$db_name = "/var/lib/gosa-si/fai_release.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "fai_release";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-fai-server.pl b/gosa-si/tests/db/sqlite-check-fai-server.pl
new file mode 100755 (executable)
index 0000000..0e9c687
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+$db_name = "/var/lib/gosa-si/fai_server.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "fai_server";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-foreign-clients.pl b/gosa-si/tests/db/sqlite-check-foreign-clients.pl
new file mode 100755 (executable)
index 0000000..61af806
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+    
+$db_name = "/var/lib/gosa-si/foreign_clients.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "foreign_clients";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-incoming.pl b/gosa-si/tests/db/sqlite-check-incoming.pl
new file mode 100755 (executable)
index 0000000..e8fe202
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+    
+$db_name = "/var/lib/gosa-si/incoming.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "incoming";
+    print "$db_name\n";
+    print "$table_name\n";
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-jobs.pl b/gosa-si/tests/db/sqlite-check-jobs.pl
new file mode 100755 (executable)
index 0000000..5f6c0db
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+    
+$db_name = "/var/lib/gosa-si/jobs.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "jobs";
+    print "$db_name\n";
+    print "$table_name\n";
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-messaging.pl b/gosa-si/tests/db/sqlite-check-messaging.pl
new file mode 100755 (executable)
index 0000000..075a915
--- /dev/null
@@ -0,0 +1,45 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+    
+$db_name = "/var/lib/gosa-si/messaging.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "messaging";
+    print "$db_name\n";
+    print "$table_name\n";
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-packages-list.pl b/gosa-si/tests/db/sqlite-check-packages-list.pl
new file mode 100755 (executable)
index 0000000..0b4433d
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  sqlite_check_packages_list.pl
+#
+#        USAGE:  ./sqlite_check_packages_list.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  28.02.2008 11:09:15 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+
+$db_name = "/var/lib/gosa-si/packages.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "packages_list";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-server.pl b/gosa-si/tests/db/sqlite-check-server.pl
new file mode 100755 (executable)
index 0000000..6ef3757
--- /dev/null
@@ -0,0 +1,46 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+    
+$db_name = "/var/lib/gosa-si/servers.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "known_server";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/db/sqlite-check-users.pl b/gosa-si/tests/db/sqlite-check-users.pl
new file mode 100755 (executable)
index 0000000..fc6e060
--- /dev/null
@@ -0,0 +1,47 @@
+#!/usr/bin/perl 
+#===============================================================================
+#
+#         FILE:  DBD-SQlite.pl
+#
+#        USAGE:  ./DBD-SQlite.pl 
+#
+#  DESCRIPTION:  
+#
+#      OPTIONS:  ---
+# REQUIREMENTS:  ---
+#         BUGS:  ---
+#        NOTES:  ---
+#       AUTHOR:   (), <>
+#      COMPANY:  
+#      VERSION:  1.0
+#      CREATED:  20.12.2007 08:54:52 CET
+#     REVISION:  ---
+#===============================================================================
+
+use strict;
+use warnings;
+use GOSA::DBsqlite;
+use Data::Dumper;
+
+sub daemon_log {}
+print "START\n";
+my $res;
+my $db_name;
+
+
+$db_name = "/var/lib/gosa-si/users.db";
+if (-e $db_name) {
+    print "\n############################################################\n";
+    my $table_name = "login_users";
+    print "$db_name\n";
+    print "$table_name\n";
+
+    my $sqlite = GOSA::DBsqlite->new($db_name);
+    my $col_names = $sqlite->get_table_columns($table_name);
+    print join(', ', @{ $col_names } )."\n" ;
+    my $answer = $sqlite->show_table($table_name);
+    print $answer."\n";
+}
+
+
+print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-clients.pl b/gosa-si/tests/sqlite-check-clients.pl
deleted file mode 100755 (executable)
index 218c913..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-print "START\n";
-my $res;
-my $db_name;
-
-sub daemon_log {}
-
-$db_name = "/var/lib/gosa-si/clients.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "known_clients";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-concurrency.pl b/gosa-si/tests/sqlite-check-concurrency.pl
deleted file mode 100755 (executable)
index ece1a35..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/perl -W
-
-package GOSA::DBsqlite;
-use strict;
-use warnings;
-
-use DBI;
-use Data::Dumper;
-use Time::HiRes qw(usleep);
-use Fcntl ':flock';
-use threads;
-
-
-sub daemon_log {}
-
-my %threads;
-# Count of threads, if > 1 it corrupts the db
-my $count= 10;
-my $db_name= "./test.sqlite";
-my $lock = $db_name.".si.lock";
-
-#if(stat($lock)) {
-#      unlink($lock);
-#}
-#
-#if(stat($db_name)) {
-#      unlink($db_name)
-#}
-
-for(my $i=0;$i<$count;$i++) {
-       $threads{$i}= threads->create(\&check_database);
-}
-
-foreach my $thread (threads->list()) {
-       $thread->join();
-}
-
-sub check_database {
-       $threads{threads->self->tid()}= GOSA::DBsqlite->new($db_name);
-       threads->yield();
-       $threads{threads->self->tid()}->run_test("test");
-
-       return;
-}
-
-sub new {
-       my $class = shift;
-       my $db_name = shift;
-
-       my $self = {dbh=>undef,db_name=>undef,db_lock=>undef,db_lock_handle=>undef};
-       my $dbh = DBI->connect("dbi:SQLite:dbname=$db_name", "", "", {RaiseError => 1, AutoCommit => 1});
-       $self->{dbh} = $dbh;
-       $self->{db_name} = $db_name;
-       $self->{db_lock} = $lock;
-       bless($self,$class);
-       return($self);
-}
-
-sub lock {
-       my $self = shift;
-       open($self->{db_lock_handle}, ">>".($self->{db_lock})) unless ref $self->{db_lock_handle};
-       flock($self->{db_lock_handle},LOCK_EX);
-       seek($self->{db_lock_handle}, 0, 2);
-}
-
-
-sub unlock {
-       my $self = shift;
-       flock($self->{db_lock_handle},LOCK_UN);
-}
-
-sub run_test {
-       my $self= shift;
-       my $table_name= shift;
-       my $sql= "CREATE TABLE IF NOT EXISTS $table_name (id INTEGER PRIMARY KEY, status VARCHAR(255) DEFAULT 'none')";
-       $self->lock();
-       eval {
-               $self->{dbh}->do($sql);
-       };
-       if($@) {
-               print STDERR Dumper($@);
-       }
-       $self->unlock();
-
-       for(my $i=0;$i<100;$i++) {
-               $sql= "INSERT INTO $table_name (id, status) VALUES (null, 'test $i')";
-               $self->lock();
-               eval {
-                       $self->{dbh}->do($sql);
-               };
-               if($@) {
-                       print STDERR Dumper($@);
-               }
-               $self->unlock();
-       }
-}
diff --git a/gosa-si/tests/sqlite-check-fai-release.pl b/gosa-si/tests/sqlite-check-fai-release.pl
deleted file mode 100755 (executable)
index df90a7b..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-$db_name = "/var/lib/gosa-si/fai_release.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "fai_release";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-fai-server.pl b/gosa-si/tests/sqlite-check-fai-server.pl
deleted file mode 100755 (executable)
index 0e9c687..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-$db_name = "/var/lib/gosa-si/fai_server.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "fai_server";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-foreign-clients.pl b/gosa-si/tests/sqlite-check-foreign-clients.pl
deleted file mode 100755 (executable)
index 61af806..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-    
-$db_name = "/var/lib/gosa-si/foreign_clients.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "foreign_clients";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-incoming.pl b/gosa-si/tests/sqlite-check-incoming.pl
deleted file mode 100755 (executable)
index e8fe202..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-    
-$db_name = "/var/lib/gosa-si/incoming.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "incoming";
-    print "$db_name\n";
-    print "$table_name\n";
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-jobs.pl b/gosa-si/tests/sqlite-check-jobs.pl
deleted file mode 100755 (executable)
index 5f6c0db..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-    
-$db_name = "/var/lib/gosa-si/jobs.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "jobs";
-    print "$db_name\n";
-    print "$table_name\n";
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-messaging.pl b/gosa-si/tests/sqlite-check-messaging.pl
deleted file mode 100755 (executable)
index 075a915..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-    
-$db_name = "/var/lib/gosa-si/messaging.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "messaging";
-    print "$db_name\n";
-    print "$table_name\n";
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-packages-list.pl b/gosa-si/tests/sqlite-check-packages-list.pl
deleted file mode 100755 (executable)
index 0b4433d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  sqlite_check_packages_list.pl
-#
-#        USAGE:  ./sqlite_check_packages_list.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  28.02.2008 11:09:15 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-
-$db_name = "/var/lib/gosa-si/packages.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "packages_list";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-server.pl b/gosa-si/tests/sqlite-check-server.pl
deleted file mode 100755 (executable)
index 6ef3757..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-    
-$db_name = "/var/lib/gosa-si/servers.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "known_server";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-print "\nFINISH\n";
diff --git a/gosa-si/tests/sqlite-check-users.pl b/gosa-si/tests/sqlite-check-users.pl
deleted file mode 100755 (executable)
index fc6e060..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/perl 
-#===============================================================================
-#
-#         FILE:  DBD-SQlite.pl
-#
-#        USAGE:  ./DBD-SQlite.pl 
-#
-#  DESCRIPTION:  
-#
-#      OPTIONS:  ---
-# REQUIREMENTS:  ---
-#         BUGS:  ---
-#        NOTES:  ---
-#       AUTHOR:   (), <>
-#      COMPANY:  
-#      VERSION:  1.0
-#      CREATED:  20.12.2007 08:54:52 CET
-#     REVISION:  ---
-#===============================================================================
-
-use strict;
-use warnings;
-use GOSA::DBsqlite;
-use Data::Dumper;
-
-sub daemon_log {}
-print "START\n";
-my $res;
-my $db_name;
-
-
-$db_name = "/var/lib/gosa-si/users.db";
-if (-e $db_name) {
-    print "\n############################################################\n";
-    my $table_name = "login_users";
-    print "$db_name\n";
-    print "$table_name\n";
-
-    my $sqlite = GOSA::DBsqlite->new($db_name);
-    my $col_names = $sqlite->get_table_columns($table_name);
-    print join(', ', @{ $col_names } )."\n" ;
-    my $answer = $sqlite->show_table($table_name);
-    print $answer."\n";
-}
-
-
-print "\nFINISH\n";