Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip utils_test if timelib is not installed #32699

Merged
merged 1 commit into from
Apr 20, 2016
Merged

Skip utils_test if timelib is not installed #32699

merged 1 commit into from
Apr 20, 2016

Conversation

eradman
Copy link
Contributor

@eradman eradman commented Apr 19, 2016

What does this PR do?

Skips a test if timelib is not installed instead of throwing an error

Previous Behavior

============================  Overall Tests Report  ============================
*** unit.utils.utils_test.UtilsTestCase.test_date_cast Tests  ******************
 --------  Tests with Errors  --------------------------------------------------
   -> unit.utils.utils_test.UtilsTestCase.test_date_cast  ......................
       Traceback (most recent call last):
         File "/home/eradman/git/salt/tests/unit/utils/utils_test.py", line 516, in test_date_cast
           ret = utils.date_cast('Mon Dec 23 10:19:15 MST 2013')
         File "/home/eradman/git/salt/salt/utils/__init__.py", line 2117, in date_cast
           ' Consider installing timelib'.format(date))
       RuntimeError: Unable to parse Mon Dec 23 10:19:15 MST 2013. Consider installing timelib

New Behavior

============================  Overall Tests Report  ============================
*** unit.utils.utils_test.UtilsTestCase.test_date_cast Tests  ******************
 --------  Skipped Tests  ------------------------------------------------------
   -> unit.utils.utils_test.UtilsTestCase.test_date_cast  ->  'timelib' is not installed
 -------------------------------------------------------------------------------
================================================================================
OK (total=1, skipped=1, passed=0, failures=0, errors=0) 

date_cast() throws a RuntimeError, not an ImportError
@rallytime rallytime merged commit 84b740e into saltstack:develop Apr 20, 2016
@eradman eradman deleted the timelib branch April 20, 2016 20:12
gitebra pushed a commit to gitebra/salt that referenced this pull request Apr 21, 2016
* upstream/develop:
  Fix docstring typo/formatting (saltstack#32726)
  Skip utils_test if timelib is not installed (saltstack#32699)
  Handle the situation when the beacon is not configured and we try to disable it (saltstack#32695)
  Allow EC2 userdata to be templated (saltstack#32698)
  Catch up the conf/master file to include gitfs/git_pillar parms from recent releases
  Make example top file match templated version
  Fix whitespace for saltstack#32689
  Fix lint added version info
  Added an app pool restart command
  Update intro_scale.rst
  Fix routes for redhat < 6 (saltstack#32682)
meaksh pushed a commit to meaksh/salt that referenced this pull request Sep 8, 2016
date_cast() throws a RuntimeError, not an ImportError
meaksh pushed a commit to meaksh/salt that referenced this pull request Sep 8, 2016
date_cast() throws a RuntimeError, not an ImportError
gitebra pushed a commit to gitebra/salt that referenced this pull request Sep 9, 2016
* upstream/develop: (111 commits)
  Pylint fix
  Remove redundant write of public key.
  Fix breakage from updates to __utils__ (saltstack#36168)
  Remove unclosed backticks in walkthrough doc (saltstack#36170)
  fixed whitespace lint issues
  Added documentation and cleaned up some linting issues.
  Back-port saltstack#36067 to carbon (saltstack#36159)
  Use string.ascii_lowercase (saltstack#36163)
  Fixing unit tests for develop (saltstack#36141)
  Adds saltstack#36055 to release notes
  Pylint fix for saltstack#36072 (saltstack#36155)
  INFRA-3943 - Bug fix - too many volumes getting tagged (saltstack#36072)
  Remove unclosed backticks in walkthrough doc (saltstack#36154)
  Fix issue with cp.push (saltstack#36136)
  Document `owner` kwarg for `postgres_schema.present` state function (saltstack#36147)
  Ignore states that do not have a numeric jid, i.e. 'req'
  Fixed _interfaces_ifconfig output for SunOS test
  Fix tests that assert CommandExecutionError (saltstack#32485)
  Fix tests (saltstack#35693)
  Skip utils_test if timelib is not installed (saltstack#32699)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants