monasca-agent/tests/detection
Joseph Davis 623a4db21f Enable unit tests for py36
Even though there was a py36 test enabled in the gate, the tox.ini
configuration was not actually invoking the unit tests.  This
change sets up the environment to allow tests to run.

As a result, a number of Python3 errors are uncovered and fixed.

Notably:
  Python 3 does not have contextlib.nested, so reformatting using ,
  file() is not in Python 3, so use io.open() instead
  Use six.assertCountEqual(self, in tests

safe_decode:
  subprocess.check_output returns in byte encoding, while default text
type str. safe_decode does the right thing by making sure string are not
bytes in python2 and python3

No ascci encoding:
 python3 defaults to UTF-8 encoding, which is merely an extension to
ascii (default for python2).

test_json_plugin.py:
 the file being opened in binary(wb) mode so python is expecting the
string in bytes.

Some of the refactoring should be revisited after we drop Python 2
support.

Change-Id: I62b46a2509c39201ca015ca7c269b2ea70c376c8
Story: 2005047
Task: 29547
2019-07-18 16:08:09 +02:00
..
__init__.py Add detection plugin for enabling ovs plugin 2016-06-16 05:02:47 +05:30
test_ceph.py Ceph plugin detects client.admin keyring 2019-03-08 17:19:00 +00:00
test_cert_check.py Add Apache License 2018-04-14 11:50:07 +00:00
test_host_alive.py Add Apache License 2018-04-14 11:50:07 +00:00
test_http_check.py enable Keystone v3 support for http_check detection plugin 2018-12-20 18:31:18 -08:00
test_influxdb_relay.py Add dimension for influxdb-relay 2017-05-31 00:24:55 +00:00
test_influxdb.py Add dimension for influxdb-relay 2017-05-31 00:24:55 +00:00
test_json_plugin.py Add Apache License 2018-04-14 11:50:07 +00:00
test_kibana.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_libvirt.py properly convey Keystone v3 params 2019-02-15 08:09:07 +00:00
test_mon.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_ovs.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_process_check.py Enable unit tests for py36 2019-07-18 16:08:09 +02:00
test_utils.py Fix auto-detect crash on monasca-setup when using oslo.config 2017-12-19 09:48:02 +01:00
test_zookeeper.py Fix Zookeeper autodetection 2017-06-05 08:52:43 +02:00