Skip to content

Commit

Permalink
Test date with UTC instead of local timezone.
Browse files Browse the repository at this point in the history
iso_format test uses local timezone so it can fail at certain times
of the day depending on which timezone the tests are run in.

Fixes bug 1139131

Change-Id: I8fe423d96c438b46a9307fe1ecf648707183ff1c
  • Loading branch information
Brian Lamar committed Mar 2, 2013
1 parent 4028e74 commit 6a7ae17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion glance/tests/functional/test_bin_glance_cache_manage.py
Expand Up @@ -85,7 +85,7 @@ def iso_date(self, image_id):

exitcode, out, err = execute(cmd)

return datetime.date.today().isoformat() in out
return datetime.datetime.utcnow().strftime("%Y-%m-%d") in out

def test_no_cache_enabled(self):
"""
Expand Down

0 comments on commit 6a7ae17

Please sign in to comment.