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.28.2.4 -r1.28.2.5 --- openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl 16 Feb 2021 20:59:02 -0000 1.28.2.4 +++ openacs-4/packages/acs-authentication/tcl/test/sync-test-procs.tcl 6 Oct 2021 12:19:36 -0000 1.28.2.5 @@ -16,6 +16,7 @@ auth::sync::job::start auth::sync::job::start_get_document auth::sync::purge_jobs + auth::sync::job::get_authority_id } \ sync_start_end { Test batch job basics: Starting, getting document, adding entries, ending. @@ -26,9 +27,22 @@ # Start noninteractive job + set local_authority_id [auth::authority::local] + set job_id [auth::sync::job::start \ - -authority_id [auth::authority::local]] + -authority_id $local_authority_id] + aa_equals "Authority has been stored correctly" \ + [auth::sync::job::get_authority_id -job_id $job_id] \ + $local_authority_id + + set broken_job_id [db_string get_broken_job { + select max(job_id) + 1 from auth_batch_jobs + }] + aa_true "Querying the authority on an invalid job id fails" [catch { + auth::sync::job::get_authority_id -job_id $broken_job_id + }] + aa_true "Returns a job_id" {$job_id ne ""}