_acs-tcl__apm__test_callback_get_set (private)

 _acs-tcl__apm__test_callback_get_set

Defined in packages/acs-tcl/tcl/test/acs-tcl-test-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_true aa_true (public) apm_get_callback_proc apm_get_callback_proc (public) _acs-tcl__apm__test_callback_get_set _acs-tcl__apm__test_callback_get_set _acs-tcl__apm__test_callback_get_set->aa_equals _acs-tcl__apm__test_callback_get_set->aa_log _acs-tcl__apm__test_callback_get_set->aa_log_result _acs-tcl__apm__test_callback_get_set->aa_true _acs-tcl__apm__test_callback_get_set->apm_get_callback_proc

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    # The proc should not accept an invalid callback type
    set invalid_type "not-allowed-type"
    set error_p [catch {apm_get_callback_proc -type $invalid_type -package_key acs-kernel} error]
    aa_true "invalid types should result in error, got error: $error" $error_p

    # Try setting a package callback proc
    set callback_type [lindex [apm_supported_callback_types] 0]
    set proc_name "test_proc"
    set package_key "acs-automated-testing"
    set version_id [apm_version_id_from_package_key $package_key]

    set error_p [catch {
        apm_package_install_callbacks [list $callback_type $proc_name$version_id

        # Retrieve the callback proc
        set retrieved_proc_name  [apm_get_callback_proc -package_key $package_key  -type $callback_type]
        aa_equals "apm_get_callback_proc retrieve callback proc"  $retrieved_proc_name $proc_name
    } error]

    # Teardown
    apm_remove_callback_proc -package_key $package_key -type $callback_type

    if { $error_p } {
        error "$error - $::errorInfo"
    }
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "apm__test_callback_get_set (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: