_acs-tcl__secret_tokens_get (private)

 _acs-tcl__secret_tokens_get

Defined in packages/acs-tcl/tcl/test/test-set-cookie-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_run_with_teardown aa_run_with_teardown (public) aa_true aa_true (public) _acs-tcl__secret_tokens_get _acs-tcl__secret_tokens_get _acs-tcl__secret_tokens_get->aa_equals _acs-tcl__secret_tokens_get->aa_log _acs-tcl__secret_tokens_get->aa_log_result _acs-tcl__secret_tokens_get->aa_run_with_teardown _acs-tcl__secret_tokens_get->aa_true

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_run_with_teardown -rollback -test_code {
        #
        # Check random token in nsv and DB, n times
        #
        set n 10
        for {set i 0} {$i < $n} {incr i} {
            set random_token_id [sec_get_random_cached_token_id]
            set token_value     [sec_get_token $random_token_id]
            #
            # Check random token in nsv
            #
            set list_of_names [nsv_array get secret_tokens]
            aa_true "Random token ($random_token_id) is contained in nsv"  {$random_token_id in $list_of_names}
            aa_equals "Random token ($random_token_id) value in nsv correct"  "$token_value" "[dict get $list_of_names $random_token_id]"
            #
            # Check random token in DB
            #
            set token_value_db  [db_string get_token_value {
                select token
                  from secret_tokens
                 where token_id = :random_token_id
            }]
            aa_equals "Random token ($random_token_id) value is in DB"  "$token_value" "$token_value_db"
        }
    }
}} {
          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" "secret_tokens_get (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: