_acs-tcl__get_insecure_location (private)

 _acs-tcl__get_insecure_location

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

Partial Call Graph (max 5 caller/called nodes):
%3 aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) aa_section aa_section (public) aa_true aa_true (public) _acs-tcl__get_insecure_location _acs-tcl__get_insecure_location _acs-tcl__get_insecure_location->aa_log _acs-tcl__get_insecure_location->aa_log_result _acs-tcl__get_insecure_location->aa_run_with_teardown _acs-tcl__get_insecure_location->aa_section _acs-tcl__get_insecure_location->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 {
        aa_section "security::get_insecure_location"

        set current_location [util_current_location]
        aa_log "current location '$current_location'"

        set cld [ns_parseurl $current_location]
        aa_log "current location parts '$cld'"
        if {[dict exists $cld port] && [dict get $cld port] ne ""} {
            if {[dict get $cld proto] eq "http"} {
                aa_log "run tests with port based on HTTP"
                set insecure [security::get_insecure_location]
                aa_true "insecure location has same proto as current location" {$insecure eq $current_location}

                set secure [security::get_secure_location]
                set sld [ns_parseurl $secure]
                aa_true "secure location starts is HTTPS" {[dict get $sld proto] eq "https"}
            } else {
                aa_log "run tests with port based on HTTPS"
                set secure [security::get_secure_location]
                aa_true "secure location has same proto as current location" {$secure eq $current_location}

                set insecure [security::get_insecure_location]
                set ild [ns_parseurl $insecure]
                aa_true "insecure location starts is HTTP" {[dict get $ild proto] eq "http"}
            }
        } else {
            aa_log "skip tests with port"
        }

    }
}} {
          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" "get_insecure_location (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: