libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [libcloud] yan12125 opened a new issue #1490: test_v4_signature_contains_credential_scope may fail if the time zone != UTC
Date Tue, 22 Sep 2020 03:42:25 GMT

yan12125 opened a new issue #1490:

   ## Summary
   In `test_v4_signature_contains_credential_scope`, date in URL may not match the expected
one if the time zone != UTC.
   ## Detailed Information
   For example, I'm running on a machine with time zone CST (UTC+8). The aforementioned test
   _ OSCRequestSignerAlgorithmV4TestCase.test_v4_signature_contains_credential_scope _
   self = <libcloud.test.common.test_osc.OSCRequestSignerAlgorithmV4TestCase testMethod=test_v4_signature_contains_credential_scope>
       def test_v4_signature_contains_credential_scope(self):
           action = "ReadImages"
           headers = self.signer.get_request_headers(
   >       self.assertIn(
   E       AssertionError: 'Credential=my_key/20200921/my_region/my_service/osc4_request'
not found in 'OSC4-HMAC-SHA256 Credential=my_key/20200920/my_region/my_service/osc4_request,
SignedHeaders=content-type;host;x-osc-date, Signature=d0b6d1d916011b61a9963a0a61000a0e46253ab85b452596116ac410ed671561'
   libcloud/test/common/ AssertionError
   The build starts at 21 Sep 02:15:39 AM CST. The date is 20200921 in local time zone and
20200920 in UTC. Looks like the issue is that the test uses local time zone [1] while the
code uses UTC [2]
   Environment: Arch Linux, Python 3.8, apache-libcloud 3.2.0

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message