Bug 1013759

Summary: Fix aria test cases that fail at the end of the month
Product: OpenShift Online Reporter: Jessica Forrester <jforrest>
Component: Management ConsoleAssignee: Jordan Liggitt <jliggitt>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: yujzhang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:23:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jessica Forrester 2013-09-30 17:44:40 UTC
Description of problem:
The two test cases below cause failures at the end of the month.  These two test cases have been temporarily changed to rescue any assertion error and omit the testcase.  Should be fixed so that it doesn't fail at the end of the month and remove the rescue block.

  1) Failure:
test_user_should_have_bill_when_created_today(AriaUnitTest) [test/unit/aria_test.rb:1139]:
<Wed, 30 Oct 2013> expected but was
<Thu, 31 Oct 2013 00:00:00 +0000>.

  2) Failure:
test_user_should_have_bill_with_nil_day_when_outside_billing_period(AriaUnitTest) [test/unit/aria_test.rb:1119]:
<Wed, 30 Oct 2013> expected but was
<Thu, 31 Oct 2013 00:00:00 +0000>.

Comment 1 openshift-github-bot 2013-10-07 16:10:38 UTC
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/23b2ee2831b652c67331c114edfafe3a1d966ca4
Fix bug 1013759 - do date calculations correctly in testcases

Comment 2 Yujie Zhang 2013-10-08 10:11:15 UTC
Will test it at the end of this month.

Comment 3 Yujie Zhang 2013-10-30 03:36:02 UTC
Tested on devenv_3966, run the aria_test.rb and got the following result:

*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.

Run options: --seed 63154

# Running tests:

..................................................................................................................................................................................................................

Finished tests in 16.044010s, 13.0890 tests/s, 91.7476 assertions/s.

210 tests, 1472 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for aria_test.rb to /var/www/openshift/site/test/unit/test/coverage/. 3603 / 7570 LOC (47.6%) covered.

No failures, so verify this bug, thanks.