_news__check_views (private)

 _news__check_views

Defined in packages/news/tcl/test/news-db-test-init.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) db_1row db_1row (public) db_transaction db_transaction (public) _news__check_views _news__check_views _news__check_views->aa_false _news__check_views->aa_log _news__check_views->aa_log_result _news__check_views->db_1row _news__check_views->db_transaction

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_log "Check the news_items_approved view."
    set error_p 0
    db_transaction {
        db_1row select-from-news-items-approved {
            select count(*) from news_items_approved
        }
    } on_error {
        set error_p 1
    }
    aa_false "Select from news_items_approved view okay" {$error_p}


    aa_log "Check the news_items_live_or_submitted view."
    set error_p 0
    db_transaction {
        db_1row select-from-news-items-live-or-submitted {
            select count(*) from news_items_live_or_submitted
        }
    } on_error {
        set error_p 1
    }
    aa_false "Select from news_items_live_or_submitted view okay" {$error_p}


    aa_log "Check the news_items_unapproved view."
    set error_p 0
    db_transaction {
        db_1row select-from-news-items-unapproved {
            select count(*) from news_items_unapproved
        }
    } on_error {
        set error_p 1
    }
    aa_false "Select from news_items_unapproved view okay" {$error_p}


    aa_log "Check the news_item_revisions view."
    set error_p 0
    db_transaction {
        db_1row select-from-news-item-revisions {
            select count(*) from news_item_revisions
        }
    } on_error {
        set error_p 1
    }
    aa_false "Select from news_item_revisions view okay" {$error_p}


    aa_log "Check the news_item_unapproved view."
    set error_p 0
    db_transaction {
        db_1row select-from-news-item-unapproved {
            select count(*) from news_item_unapproved
        }
    } on_error {
        set error_p 1
    }
    aa_false "Select from news_item_unapproved view okay" {$error_p}


    aa_log "Check the news_item_full_active view."
    set error_p 0
    db_transaction {
        db_1row select-from-news-item-full-active {
            select count(*) from news_item_full_active
        }
    } on_error {
        set error_p 1
    }
    aa_false "Select from news_item_full_active view okay" {$error_p}
}} {
          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" "check_views (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
Generic XQL file:
packages/news/tcl/test/news-db-test-init.xql

PostgreSQL XQL file:
packages/news/tcl/test/news-db-test-init-postgresql.xql

Oracle XQL file:
packages/news/tcl/test/news-db-test-init-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: