← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1703935] Re: GCE unit test tries to connect to the network

 

This is believed fixed in 17.1

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1703935

Title:
  GCE unit test tries to connect to the network

Status in cloud-init:
  Fix Released

Bug description:
  The GCE unit test tries to connect the network and what it should
  instead do is mock the http request it is doing. See the attachment
  for tox output that gives more info about the error.

  
  From the tox output:  File "/home/user/cloud-init/tests/unittests/test_datasource/test_gce.py", line 168, in test_get_data_returns_false_if_not_on_gce
      self.assertEqual(False, self.ds.get_data())
  AssertionError: False != True
  -------------------- >> begin captured logging << --------------------
  cloudinit.url_helper: DEBUG: [0/1] open 'http://metadata.google.internal/computeMetadata/v1/instance/id' with {'headers': {'User-Agent': 'Cloud-Init/0.7.9', 'X-Google-Metadata-Request': 'True'}, 'url': 


  That test shouldn't actually get far enough to contact
  metadata.google.internal. The mock in the unit test is to blame.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1703935/+subscriptions


References