Index: openacs-4/packages/acs-bootstrap-installer/tcl/test/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/test/00-proc-procs.tcl,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/acs-bootstrap-installer/tcl/test/00-proc-procs.tcl 16 Feb 2021 02:31:33 -0000 1.1.2.3 +++ openacs-4/packages/acs-bootstrap-installer/tcl/test/00-proc-procs.tcl 1 Mar 2021 10:12:34 -0000 1.1.2.4 @@ -27,12 +27,12 @@ set fresh_fn [ns_sha1 [clock seconds]] set i 0 - + while {[file exists $fresh_fn-$i]} { incr i } # touch the fresh file without tilde close [open $fresh_fn-$i w] aa_log "filename without tilde: $fresh_fn-$i [pwd]" - + aa_true "file exists $fresh_fn-$i" [file exists $fresh_fn-$i] aa_true "ad_file exists $fresh_fn-$i" [ad_file exists $fresh_fn-$i] @@ -43,7 +43,7 @@ aa_true "ad_file tail ~$fresh_fn-$i" {[ad_file tail ~$fresh_fn-$i] eq "./~$fresh_fn-$i"} file delete $fresh_fn-$i - + # # now the same with an existing file with a leading tilde # @@ -62,3 +62,41 @@ file delete ./~$fresh_fn-$j } + +aa_register_case \ + -cats {api smoke} \ + -procs { + db_current_rdbms + db_available_pools + db_qd_get_fullname + db_qd_fetch + db_fullquery_get_querytext + db_fullquery_get_name + db_fullquery_get_query_type + } \ + db__database_interface { + Basic test of low level database interface + } { + set dbms [db_current_rdbms] + aa_equals "dbms looks valid" [dict keys $dbms] "type version" + aa_true "dbms type non-empty" {[dict get $dbms type] != ""} + aa_true "dbms version non-empty" {[dict get $dbms version] != ""} + + set pools [db_available_pools ""] + aa_true "pools '$pools' can be valid (need at least one pool)" {[llength $pools] > 0} + + set qn dbqd.acs-tcl.tcl.site-nodes-procs.site_node::mount.mount_object + set full_statement_name [db_qd_get_fullname $qn 2] + aa_true "full_statement_name '$full_statement_name'" {$full_statement_name ne ""} + set full_query [db_qd_fetch $full_statement_name ""] + aa_true "full_query '$full_query'" {$full_query ne ""} + set sql [db_fullquery_get_querytext $full_query] + aa_true "SQL:
$sql
" {$sql ne ""} + + set name [db_fullquery_get_name $full_query] + aa_true "name: $name" {$name ne ""} + + # This call is rather useless, just here for completeness + set type [db_fullquery_get_query_type $full_query] + aa_true "type: $type" {$type eq ""} + }