Project

General

Profile

Bug #15142

Some tests in hammer-cli-katello use MiniTest's assert() method improperly

Added by Andrew Kofink about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1338813
Description of problem:
The assert() method is improperly used in several locations, causing tests to pass when they should potentially fail.

Version-Release number of selected component (if applicable):
upstream

How reproducible:
always

Steps to Reproduce:
N/A

Actual results:
N/A

Expected results:
N/A

Additional info:
Most of these tests use assert() like assert_equal(x, y), where the assertion is dependent on the equality of x and y. The assert(x, msg) method asserts that x is a true value, and provides msg when the assertion fails.

Associated revisions

Revision 27fe17d0 (diff)
Added by Andrew Kofink about 3 years ago

Fixes #15142 - Replace improper assert() usage (#402)

These methods come from MiniTest.

- `assert(x, msg)` asserts that x is true and prints msg when false.
- `assert_equal(x, y)` asserts that x and y are equal

History

#1 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/hammer-cli-katello/pull/402 added

#2 Updated by Eric Helms about 3 years ago

  • Legacy Backlogs Release (now unused) set to 143

#3 Updated by Anonymous about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF