Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560374 - app-admin/salt-2015.8.0: remove tests for salt.modules.mod_random
Summary: app-admin/salt-2015.8.0: remove tests for salt.modules.mod_random
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2015-09-13 20:36 UTC by Thomas Deutschmann (RETIRED)
Modified: 2015-09-29 01:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Remove tests for salt.modules.mod_random when using network-sandbox (remove-tests-for-mod_random-when-using-network-sandbox.diff,602 bytes, patch)
2015-09-13 20:36 UTC, Thomas Deutschmann (RETIRED)
Details | Diff
Remove tests for salt.modules.mod_random when using network-sandbox (remove-tests-for-mod_random-when-using-network-sandbox.diff,601 bytes, patch)
2015-09-13 20:38 UTC, Thomas Deutschmann (RETIRED)
Details | Diff
Remove tests for salt.modules.mod_random when using network-sandbox (remove-tests-for-mod_random-when-using-network-sandbox.diff,716 bytes, patch)
2015-09-13 21:09 UTC, Thomas Deutschmann (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2015-09-13 20:36:08 UTC
Created attachment 411824 [details, diff]
Remove tests for salt.modules.mod_random when using network-sandbox

Hi,

tests for salt.modules.mod_random will fail when using FEATURES=network-sandbox:

======================================================================
ERROR: test_generateblobs (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 296, in test_generateblobs
    format='hex'), ret6)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 740, in generateBlobs
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable

======================================================================
ERROR: test_generatedecimalfractions (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 203, in test_generatedecimalfractions
    decimalPlaces=4, replacement=True), ret5)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 554, in generateDecimalFractions
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable

======================================================================
ERROR: test_generategaussians (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 255, in test_generategaussians
    significantDigits=8),
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 651, in generateGaussians
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable

======================================================================
ERROR: test_generateintegers (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 94, in test_generateintegers
    maximum=6, base=2),
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 283, in generateIntegers
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable

======================================================================
ERROR: test_generatestrings (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 144, in test_generatestrings
    characters=char), ret3)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 388, in generateStrings
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable

======================================================================
ERROR: test_generateuuids (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 171, in test_generateuuids
    number=5), ret3)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 459, in generateUUIDs
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable

======================================================================
ERROR: test_getusage (unit.modules.random_org_test.RandomOrgTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/tests/unit/modules/random_org_test.py", line 42, in test_getusage
    api_version='1'),
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 168, in getUsage
    result = _query(api_version=api_version, data=data)
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/modules/random_org.py", line 110, in _query
    opts=__opts__,
  File "/var/tmp/portage/app-admin/salt-2015.8.0/work/salt-2015.8.0-python2_7/build/lib/salt/utils/http.py", line 424, in query
    **req_kwargs
  File "/usr/lib64/python2.7/site-packages/tornado/httpclient.py", line 102, in fetch
    self._async_client.fetch, request, **kwargs))
  File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 445, in run_sync
    return future_cell[0].result()
  File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 215, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 3, in raise_exc_info
error: [Errno 101] Network is unreachable


Please see my proposal to remove tests for salt.modules.mod_random when detecting FEATURES=network-sandbox.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2015-09-13 20:38:35 UTC
Created attachment 411826 [details, diff]
Remove tests for salt.modules.mod_random when using network-sandbox
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2015-09-13 21:09:17 UTC
Created attachment 411840 [details, diff]
Remove tests for salt.modules.mod_random when using network-sandbox

Moving this to python_prepare.
Comment 3 SpanKY gentoo-dev 2015-09-16 15:46:41 UTC
(external) network tests should always be disabled.  we want to move to a state where the (external) network is never available to packages.  if the test can use localhost, it should.