manila/manila
zengyingzhe 5ea4911794 Fix the broken UT of huawei driver for py34/35
The cause of failing unit tests is a bug in huawei driver.
When huawei driver logins to backend, it reads username/password from
huawei configuration file. If the username/password are configured as
plain text, huawei driver'll encode them and overwrite the encoded text
to the configuration file.

The encoding logic code is like this:
  six.text_type(base64.b64encode("***"))

For py27, this code works fine. However, for py34, this text_type
converting adds some extra words to result unicode string, like
"b'***'"('***' is the actual encoded result string).
Once driver reads the username/password again, it'll get the incorrect
text and then fail while jsonutils.dumps.

All the failed unit tests tried to call login twice, and triggered the
error condition said above.

This patch is just a workaround, because those failed tests actually
no need to login twice, the redundant login calls are removed.

Another patch will be commited to fix the problem thoroughly in huawei
driver.  Bug https://launchpad.net/bugs/1612149 has been raised for
that work, and will also analyze what changed to trigger this issue
only recently.

Change-Id: Ia6bf7bbb9ffb9644085bbdf4f5576f09215a877f
Closes-Bug: #1612149
2016-08-11 15:53:05 +00:00
..
api Add snapshot instances admin APIs 2016-07-29 11:21:35 +08:00
cmd Detect addition of executable files 2016-04-08 14:28:42 +00:00
common Do not put real hostname and IP address to manila config sample 2016-07-15 12:26:09 +00:00
compute Remove unused logging import and LOG global 2016-04-05 07:06:08 -04:00
consistency_group Fix share server info in CGs created from CGs 2016-05-09 16:58:44 +00:00
data Config: no need to set default=None 2016-06-28 15:40:40 +08:00
db Remove "host" from driver private data 2016-07-26 14:57:34 +08:00
hacking Do not supply logging arguments as tuple. 2016-06-09 17:22:36 -04:00
network Add gateway in network_info and share network API 2016-06-30 12:08:12 -04:00
scheduler Add DriverFilter and GoodnessWeigher to manila 2016-07-18 17:28:40 -03:00
share Merge "Add support for CIFS shares in HNAS driver" 2016-08-10 03:30:51 +00:00
testing Rewrited mox tests to mock (part 2) 2014-06-17 17:55:21 +03:00
tests Fix the broken UT of huawei driver for py34/35 2016-08-11 15:53:05 +00:00
volume Remove unused logging import and LOG global 2016-04-05 07:06:08 -04:00
__init__.py Removed ignored checks from tox.ini and fixed pep8 issues 2016-02-14 14:56:55 +02:00
context.py Fix context warning spam of scheduler and share logs 2016-05-17 05:35:09 -04:00
exception.py Add EMC Unity Driver for Manila 2016-07-28 23:13:29 -07:00
i18n.py Switch to using oslo_* instead of oslo.* 2015-01-27 09:19:50 +01:00
manager.py Reuse 'periodic_task' from oslo_service 2015-07-20 19:38:19 +03:00
opts.py Add lvm driver options to sample config 2016-07-05 07:02:43 -04:00
policy.py Fix docstring for policy.enforce method 2016-05-02 08:28:13 -04:00
quota.py Update quota of proper user on resource delete 2016-03-11 12:55:44 +01:00
rpc.py Drop use of 'oslo' namespace package 2015-04-29 16:51:33 +03:00
service.py Trivial Fix: fix missing import 2016-01-21 19:36:47 +08:00
test.py Test: make enforce_type=True in CONF.set_override 2016-05-12 11:27:30 +05:30
utils.py Use is_valid_ipv4 and is_valid_ipv6 from oslo.utils 2016-06-10 22:53:25 +08:00
version.py Remove vim headers 2014-10-06 15:00:27 +02:00
wsgi.py Merge "Set TCP keepalive options" 2016-03-11 18:43:44 +00:00