You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2020/12/30 00:01:58 UTC

[GitHub] [libcloud] macfreek opened a new issue #1538: DNSPodDNSDriver.create_record() ignores extra parameter

macfreek opened a new issue #1538:
URL: https://github.com/apache/libcloud/issues/1538


   ## DNSPodDNSDriver.create_record() ignores extra parameter
   
   DNSPodDNSDriver.create_record ignores the `extra` parameter completely. 
   
   Consider the following code (taken from [test_dnspod.py](https://github.com/apache/libcloud/blob/6b588346083a510396c63b5d18db3012aa083071/libcloud/test/dns/test_dnspod.py#L156)):
   
       def test_create_record_success(self):
           DNSPodMockHttp.type = 'CREATE_RECORD_SUCCESS'
           record = self.driver.create_record(name='@', zone=self.test_zone,
                                              type='A', data='96.126.115.73',
                                              extra={'ttl': 13,
                                                     'record_line': 'default'})
   
   ## Expected result
   
   I would expect `record.extra['ttl']` to be an int 13
   
   ## Actual result
   
   The TTL of `record.extra['ttl']` is the string '600'.
   
   Note that '600' (yes, as a string) is the default TTL of the `self.test_zone`. [See the explicit check in line 61](https://github.com/apache/libcloud/blob/6b588346083a510396c63b5d18db3012aa083071/libcloud/test/dns/test_dnspod.py#L61).
   
   ## Detailed Information
   
   This unit test never bothers to read `record.extra['ttl']`.
   
   It however, does read `record.ttl`, which is verified to be None. As -apparently- what is to be expected. At least, that's what the unit test [explicitly expects on line 165](https://github.com/apache/libcloud/blob/6b588346083a510396c63b5d18db3012aa083071/libcloud/test/dns/test_dnspod.py#L165).
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [libcloud] stale[bot] commented on issue #1538: DNSPodDNSTests.test_create_record_success() returns an unexpected value

Posted by GitBox <gi...@apache.org>.
stale[bot] commented on issue #1538:
URL: https://github.com/apache/libcloud/issues/1538#issuecomment-868936503


   Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org