Index: openacs-4/packages/acs-api-browser/tcl/test/acs-api-browser-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/test/acs-api-browser-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-api-browser/tcl/test/acs-api-browser-procs.tcl 7 Aug 2017 23:47:45 -0000 1.3 +++ openacs-4/packages/acs-api-browser/tcl/test/acs-api-browser-procs.tcl 19 Jul 2018 11:46:57 -0000 1.4 @@ -7,17 +7,20 @@ } aa_register_case \ - -cats {api smoke} \ + -cats { api smoke } \ + -procs { + api_library_documentation + } \ acs_api_browser_trivial_smoke_test { - Minimal smoke test for acs-api-browser package. -} { + Minimal smoke test for acs-api-browser package. + } { - aa_run_with_teardown \ + aa_run_with_teardown \ -rollback \ -test_code { set result [api_library_documentation packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl] aa_true "api documentation proc can document itself" \ - [ string match "*packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl*" $result] + [string match "*packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl*" $result] } } # Local variables: Index: openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl,v diff -u -r1.48 -r1.49 --- openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl 9 May 2018 15:33:28 -0000 1.48 +++ openacs-4/packages/acs-authentication/tcl/test/acs-authentication-procs.tcl 19 Jul 2018 11:49:46 -0000 1.49 @@ -7,10 +7,17 @@ } aa_register_case \ - -cats {api}\ + -cats {api} \ + -procs { + acs_user::change_state + acs_user::delete + acs_user::get_by_username + auth::authenticate + auth::create_user + } \ auth_authenticate { Test the auth::authenticate proc. -} { +} { # Initialize variables set username "auth_create_user1" @@ -132,9 +139,14 @@ } } -aa_register_case \ - -cats {api} \ - auth_create_user { +aa_register_case -cats {api} -procs { + + acs_user::delete + acs_user::get_by_username + ad_generate_random_string + auth::create_user + +} auth_create_user { Test the auth::create_user proc. } { @@ -268,9 +280,13 @@ } } -aa_register_case \ - -cats {db api smoke} \ - auth_confirm_email { +aa_register_case -cats {db api smoke} -procs { + + acs_user::flush_cache + acs_user::get_element + auth::set_email_verified + +} auth_confirm_email { Test the auth::set_email_verified proc. } { set user_id [ad_conn user_id] @@ -290,9 +306,12 @@ } } -aa_register_case \ +aa_register_case \ -cats {api smoke} \ -error_level {warning} \ + -procs { + auth::get_registration_elements + } \ auth_get_registration_elements { Test the auth::get_registration_elements proc } { @@ -307,6 +326,9 @@ aa_register_case \ -cats {api smoke} \ -error_level {warning} \ + -procs { + auth::get_registration_form_elements + } \ auth_get_registration_form_elements { Test the auth::get_registration_form_elements proc } { @@ -323,6 +345,10 @@ aa_register_case \ -cats {api smoke} \ + -procs { + auth::password::get_change_url + auth::test::get_password_vars + } \ auth_password_get_change_url { Test the auth::password::get_change_url proc. } { @@ -340,6 +366,10 @@ aa_register_case \ -cats {api smoke} \ -error_level {warning} \ + -procs { + auth::password::can_change_p + auth::test::get_password_vars + } \ auth_password_can_change_p { Test the auth::password::can_change_p proc. } { @@ -352,6 +382,16 @@ aa_register_case \ -cats {api} \ + -procs { + acs_user::delete + ad_acs_kernel_id + ad_check_password + ad_parameter_cache + auth::create_user + auth::password::change + parameter::get + parameter::set_value + } \ auth_password_change { Test the auth::password::change proc. } { @@ -408,6 +448,10 @@ aa_register_case \ -cats {api smoke} \ + -procs { + auth::password::recover_password + auth::test::get_password_vars + } \ auth_password_recover { Test the auth::password::recover_password proc. } { @@ -437,6 +481,10 @@ aa_register_case \ -cats {api smoke} \ + -procs { + auth::password::get_forgotten_url + auth::test::get_password_vars + } \ auth_password_get_forgotten_url { Test the auth::password::get_forgotten_url proc. } { @@ -459,6 +507,10 @@ aa_register_case \ -cats {api smoke} \ + -procs { + auth::password::retrieve + auth::test::get_password_vars + } \ auth_password_retrieve { Test the auth::password::retrieve proc. } { @@ -473,6 +525,14 @@ aa_register_case \ -cats {api} \ + -procs { + acs_user::delete + acs_user::get_by_username + auth::authentication::Authenticate + auth::authority::local + auth::create_user + auth::password::reset + } \ auth_password_reset { Test the auth::password::reset proc. } { @@ -540,6 +600,10 @@ aa_register_case \ -cats {api db} \ + -procs { + auth::password::retrieve + auth::test::get_password_vars + } \ auth_authority_api { Test the auth::authority::create, auth::authority::edit, and auth::authority::delete procs. } { @@ -613,6 +677,15 @@ aa_register_case \ -cats {api} \ + -procs { + acs_sc::impl::get_id + ad_generate_random_string + auth::authority::get + auth::authority::local + auth::driver::get_parameter_values + auth::driver::get_parameters + auth::driver::set_parameter_value + } \ auth_driver_get_parameter_values { Test the auth::driver::set_parameter_values proc. } { @@ -661,6 +734,16 @@ aa_register_case \ -cats {api} \ + -procs { + ad_acs_kernel_id + ad_generate_random_string + auth::UseEmailForLoginP + auth::authenticate + auth::authority::local + auth::create_user + auth::get_registration_elements + parameter::set_value + } \ auth_use_email_for_login_p { Test auth::UseEmailForLoginP } { @@ -724,6 +807,14 @@ aa_register_case \ -cats {api} \ + -procs { + ad_acs_kernel_id + ad_generate_random_string + ad_parameter_cache + auth::create_user + auth::password::change + parameter::set_value + } \ auth_email_on_password_change { Test acs-kernel.EmailAccountOwnerOnPasswordChangeP parameter } { Index: openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl 7 Jul 2018 14:26:33 -0000 1.23 +++ openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl 19 Jul 2018 11:49:46 -0000 1.24 @@ -6,7 +6,18 @@ @cvs-id $Id$ } -aa_register_case -cats {api db} sync_start_end { +aa_register_case \ + -cats {api db} \ + -procs { + auth::authority::local + auth::sync::job::create_entry + auth::sync::job::end + auth::sync::job::end_get_document + auth::sync::job::start + auth::sync::job::start_get_document + auth::sync::purge_jobs + } \ + sync_start_end { Test batch job basics: Starting, getting document, adding entries, ending. } { aa_run_with_teardown \ @@ -80,7 +91,20 @@ } } -aa_register_case -cats {api} sync_actions { +aa_register_case \ + -cats {api} \ + -procs { + acs_user::get + acs_user::get_user_info + ad_generate_random_string + auth::authority::local + auth::sync::job::action + auth::sync::job::end + auth::sync::job::get_entry + auth::sync::job::start + util_sets_equal_p + } \ + sync_actions { Test job actions: insert, update, } { aa_run_with_teardown \ @@ -89,8 +113,7 @@ # Start non-interactive job - set job_id [auth::sync::job::start \ - -authority_id [auth::authority::local]] + set job_id [auth::sync::job::start -authority_id [auth::authority::local]] aa_true "Returns a job_id" [expr {[info exists job_id]}] @@ -334,7 +357,19 @@ } } -aa_register_case -cats {api db} sync_snapshot { +aa_register_case \ + -cats {api db} \ + -procs { + acs_user::get + ad_generate_random_string + auth::authority::local + auth::sync::job::action + auth::sync::job::end + auth::sync::job::get_entry + auth::sync::job::snapshot_delete_remaining + auth::sync::job::start + } \ + sync_snapshot { Test a snapshot job } { aa_run_with_teardown \ @@ -343,8 +378,7 @@ # Start non-interactive job - set job_id [auth::sync::job::start \ - -authority_id [auth::authority::local]] + set job_id [auth::sync::job::start -authority_id [auth::authority::local]] aa_true "Returns a job_id" [expr {$job_id ne ""}] @@ -461,21 +495,28 @@ array set job [auth::sync::job::end -job_id $job_id] - aa_true "Elapsed time less than 30 seconds" [expr {$job(run_time_seconds) < 30}] + aa_true "Elapsed time less than 30 seconds" {$job(run_time_seconds) < 30} aa_false "Not interactive" [template::util::is_true $job(interactive_p)] aa_equals "Number of actions" $job(num_actions) [expr {$num_users_not_banned + 1}] aa_equals "Number of problems" $job(num_problems) 0 - aa_false "Log URL non-empty" [expr {$job(log_url) eq ""}] + aa_false "Log URL non-empty" {$job(log_url) eq ""} } } -aa_register_case -cats {api smoke} sync_batch_for_local { +aa_register_case \ + -cats {api smoke} \ + -procs { + auth::authority::batch_sync + auth::authority::local + auth::sync::job::get + } \ + sync_batch_for_local { Test a batch job for the local authority } { aa_run_with_teardown \ @@ -492,7 +533,18 @@ } -aa_register_case -cats {api} sync_batch_ims_example_doc { +aa_register_case \ + -cats {api} \ + -procs { + acs_sc::impl::get_id + auth::authority::batch_sync + auth::authority::create + auth::sync::job::get + auth::sync::job::get_entries + auth::sync::job::get_entry + util_sets_equal_p + } \ + sync_batch_ims_example_doc { Test IMS Enterprise 1.1 batch sync with the XML document from the specification. } { aa_stub acs_sc::invoke { @@ -674,7 +726,22 @@ } -aa_register_case -cats {api} sync_batch_ims_test { +aa_register_case \ + -cats {api} \ + -procs { + acs_sc::impl::get_id + acs_user::get + acs_user::get_user_info + ad_generate_random_string + auth::authority::batch_sync + auth::authority::create + auth::driver::set_parameter_value + auth::sync::GetElements + auth::sync::job::get + auth::sync::job::get_entries + auth::sync::job::get_entry + } \ + sync_batch_ims_test { Test IMS Enterprise 1.1 batch sync with a constructed document which actually works } { aa_stub acs_sc::invoke { @@ -944,7 +1011,13 @@ } } -aa_register_case -cats {api smoke} sync_http_get_document { +aa_register_case \ + -cats {api smoke} \ + -procs { + acs_sc::invoke + ns_parseurl + } \ + sync_http_get_document { Test the HTTPGet implementation of GetDocument service contract. } { set url [ad_url] @@ -973,7 +1046,13 @@ aa_equals "result.document is 'success'" $result(document) "success" } -aa_register_case -cats {api web} sync_file_get_document { +aa_register_case \ + -cats {api web} \ + -procs { + acs_sc::invoke + template::util::read_file + } \ + sync_file_get_document { Test the HTTPGet implementation of GetDocument service contract. } { set path "$::acs::rootdir/www/SYSTEM/dbtest.tcl"