Many error codes do not exist

NEW
Assigned to

Status

4 years ago
4 years ago

People

(Reporter: LpSolit, Assigned: gregaryh)

Tracking

Details

(Reporter)

Description

4 years ago
Run runtests.pl 12 and see the list of error codes used which are not defined:

# ./runtests.pl 12
t/012throwables.t .. 1/295 
#   Failed test 'extensions/Testopia/lib/Environment.pm has 3 error(s):
# user error tag 'could-not-create-environment' is used at line(s) (285) but not defined for language(s): any
# user error tag 'could-not-create-property' is used at line(s) (329) but not defined for language(s): any
# user error tag 'could-not-create-element' is used at line(s) (314) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'extensions/Testopia/lib/Importer.pm has 2 error(s):
# user error tag 'invlid-import-source' is used at line(s) (305) but not defined for language(s): any
# user error tag 'plan_needed' is used at line(s) (348) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'extensions/Testopia/lib/Report.pm has 2 error(s):
# code error tag 'invalid_dimensions' is used at line(s) (105,111) but not defined for language(s): any
# code error tag 'report_axis_invalid' is used at line(s) (188,191,194) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'extensions/Testopia/lib/Search.pm has 2 error(s):
# user error tag 'unknown_keyword' is used at line(s) (801) but not defined for language(s): any
# code error tag 'field_type_mismatch' is used at line(s) (1625) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'extensions/Testopia/lib/TestCase.pm has 2 error(s):
# user error tag 'plan_needed' is used at line(s) (332) but not defined for language(s): any
# user error tag 'invalid_status' is used at line(s) (170) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'extensions/Testopia/lib/TestCaseRun.pm has 1 error(s):
# user error tag 'invalid_status' is used at line(s) (150) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_case_reports.cgi has 1 error(s):
# code error tag 'unknown_action' is used at line(s) (112) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_caserun_reports.cgi has 1 error(s):
# code error tag 'unknown_action' is used at line(s) (78) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_history.cgi has 1 error(s):
# user error tag 'testopia-unknown-type' is used at line(s) (46) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_importer.cgi has 4 error(s):
# user error tag 'csv_parse_failure' is used at line(s) (158) but not defined for language(s): any
# user error tag 'import_repeat' is used at line(s) (75) but not defined for language(s): any
# user error tag 'invalid_import_type' is used at line(s) (91) but not defined for language(s): any
# user error tag 'token_inexistent' is used at line(s) (71) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_new_case.cgi has 1 error(s):
# user error tag 'testopia-create-category' is used at line(s) (103) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_plan_access.cgi has 1 error(s):
# user error tag 'baduser' is used at line(s) (92) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_plan_reports.cgi has 1 error(s):
# code error tag 'unknown_action' is used at line(s) (190) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_run_reports.cgi has 1 error(s):
# code error tag 'unknown_action' is used at line(s) (372) but not defined for language(s): any'
#   at t/012throwables.t line 199.

#   Failed test 'tr_tags.cgi has 2 error(s):
# user error tag 'unkown-type' is used at line(s) (128) but not defined for language(s): any
# user error tag 'unknown-type' is used at line(s) (82) but not defined for language(s): any'
#   at t/012throwables.t line 199.
# Looks like you failed 15 tests of 295.
t/012throwables.t .. Dubious, test returned 15 (wstat 3840, 0xf00)
Failed 15/295 subtests

Test Summary Report
-------------------
t/012throwables.t (Wstat: 3840 Tests: 295 Failed: 15)
  Failed tests:  169, 174, 177-178, 180-181, 249, 251, 256
                258, 266, 270-271, 278, 283


'unknown_action' is an upstream error code and is easy to fix. You must now use ThrowUserError() instead of ThrowCodeError(). But the other ones seem to be completely missing.
(Reporter)

Comment 1

4 years ago
(In reply to Frédéric Buclin from comment #0)
> 'unknown_action' is an upstream error code and is easy to fix. You must now
> use ThrowUserError() instead of ThrowCodeError().

I fixed this specific error code:

To ssh://gitolite3@git.mozilla.org/bugzilla/extensions/Testopia.git
   d68ed0c..f1c2c3a  master -> master
You need to log in before you can comment on or make changes to this bug.