py310 unit test failures
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
proliantutils |
New
|
Undecided
|
Unassigned |
Bug Description
There are 8 unit test failures with py310. These can be recreated on Ubuntu 22.04 with 'tox -e py310'.
Corey Bryant (corey.bryant) wrote : | #1 |
Julia Kreger (juliaashleykreger) wrote : | #2 |
I'm encountering the same issue on stable/wallaby, while running `tox -epy38`, with my uppers constraints slightly modified as such, just for pip to be happy.
$ git diff
diff --git a/tox.ini b/tox.ini
index 3a356b3..b22b8d2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -14,7 +14,6 @@ setenv = VIRTUAL_
deps =
- -c{env:
-r{toxinidir
-r{toxinidir
commands =
$ ^C
Anyhow, I see 8 tests failing as above, as proliantutils is attempting to mock internals of sushy, which is not great, but then is attempting to leverage other parts without just submitting code to sushy, which is also not great.
proliantutils.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/
return func(*newargs, **newkeywargs)
File "/home/
self.hpe_sushy = main.HPESushy('https:/
File "/home/
super(HPESushy, self).__init__(
File "/home/
self.
File "/home/
self.
File "/home/
super(
File "/home/
auth_token, session_uri = self._root_
File "/home/
self.
File "/home/
raise AttributeError(
AttributeError: Mock object has no attribute '_session'
and...
proliantutils.
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/
self.
File "/home/
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to proliantutils (master) | #3 |
Related fix proposed to branch: master
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to proliantutils (stable/yoga) | #4 |
Fix proposed to branch: stable/yoga
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to proliantutils (stable/xena) | #5 |
Fix proposed to branch: stable/xena
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix proposed to proliantutils (stable/wallaby) | #6 |
Fix proposed to branch: stable/wallaby
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Fix merged to proliantutils (stable/yoga) | #7 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/yoga
commit a439eb7fa853947
Author: Nisha Agarwal <email address hidden>
Date: Fri Sep 2 16:57:06 2022 +0000
fix the broken test cases
Adds a mock of sushy internal authentication to avoid
internal exceptions occuring from tests executing which
are expecting specific precise method behavior/
from the underlying sushy library.
This is due to Id9a32ebcc04f4f
and Ic52c4353cb1e16
which fixed authentication handling so connection retry
and recovery can be approperately handled.
Also swaps the header to etag call on a boot mode check
introduced by I6b802fbb6a3f93
which is impacted by recent fixes to handle etag requirements
in some BMCs, such as I6b802fbb6a3f93
Closes-Bug: 1976555
Change-Id: Idb1d362bc890af
tags: | added: in-stable-yoga |
tags: | added: in-stable-wallaby |
OpenStack Infra (hudson-openstack) wrote : Fix merged to proliantutils (stable/wallaby) | #8 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 809f641ebf10507
Author: Nisha Agarwal <email address hidden>
Date: Fri Sep 2 16:57:06 2022 +0000
fix the broken test cases
Adds a mock of sushy internal authentication to avoid
internal exceptions occuring from tests executing which
are expecting specific precise method behavior/
from the underlying sushy library.
This is due to Id9a32ebcc04f4f
and Ic52c4353cb1e16
which fixed authentication handling so connection retry
and recovery can be approperately handled.
Also swaps the header to etag call on a boot mode check
introduced by I6b802fbb6a3f93
which is impacted by recent fixes to handle etag requirements
in some BMCs, such as I6b802fbb6a3f93
Closes-Bug: 1976555
Change-Id: Idb1d362bc890af
(cherry picked from commit a439eb7fa853947
(cherry picked from commit 6b2910aaf0d353f
OpenStack Infra (hudson-openstack) wrote : Fix merged to proliantutils (stable/xena) | #9 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit 6b2910aaf0d353f
Author: Nisha Agarwal <email address hidden>
Date: Fri Sep 2 16:57:06 2022 +0000
fix the broken test cases
Adds a mock of sushy internal authentication to avoid
internal exceptions occuring from tests executing which
are expecting specific precise method behavior/
from the underlying sushy library.
This is due to Id9a32ebcc04f4f
and Ic52c4353cb1e16
which fixed authentication handling so connection retry
and recovery can be approperately handled.
Also swaps the header to etag call on a boot mode check
introduced by I6b802fbb6a3f93
which is impacted by recent fixes to handle etag requirements
in some BMCs, such as I6b802fbb6a3f93
Closes-Bug: 1976555
Change-Id: Idb1d362bc890af
(cherry picked from commit a439eb7fa853947
tags: | added: in-stable-xena |
OpenStack Infra (hudson-openstack) wrote : Related fix merged to proliantutils (master) | #10 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit f03714f78c3e930
Author: Julia Kreger <email address hidden>
Date: Mon Nov 28 11:03:46 2022 -0800
Fix etag header test
Proliantutils has a pattern of testing internal calls inside of
the Sushy library. This has the unfortunate side effect of becoming
broken as bugs and related issues are fixed.
Fixes the check on a response which upstream sushy has discovered
has become sensitive on several vendors where eTags must be utilized
to ensure a reliable and correct response from the BMC.
Related-Bug: #1976555
Change-Id: I6b802fbb6a3f93
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to proliantutils (stable/zed) | #11 |
Related fix proposed to branch: stable/zed
Review: https:/
OpenStack Infra (hudson-openstack) wrote : Related fix merged to proliantutils (stable/zed) | #12 |
Reviewed: https:/
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit cdd715d5b633075
Author: Julia Kreger <email address hidden>
Date: Mon Nov 28 11:03:46 2022 -0800
Fix etag header test
Proliantutils has a pattern of testing internal calls inside of
the Sushy library. This has the unfortunate side effect of becoming
broken as bugs and related issues are fixed.
Fixes the check on a response which upstream sushy has discovered
has become sensitive on several vendors where eTags must be utilized
to ensure a reliable and correct response from the BMC.
Related-Bug: #1976555
Change-Id: I6b802fbb6a3f93
(cherry picked from commit f03714f78c3e930
tags: | added: in-stable-zed |
For example:
proliantutils. tests.redfish. test_main. HPESushyTestCas e.test_ get_system_ collection_ path_missing_ systems_ attr ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --
-------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/usr/lib/ python3. 10/unittest/ mock.py" , line 1369, in patched corey/pkg/ zed/upstream/ proliantutils/ proliantutils/ tests/redfish/ test_main. py", line 40, in setUp /1.2.3. 4', corey/pkg/ zed/upstream/ proliantutils/ proliantutils/ redfish/ main.py" , line 59, in __init__ corey/pkg/ zed/upstream/ proliantutils/ .tox/py310/ lib/python3. 10/site- packages/ sushy/main. py", line 203, in __init__ _auth.authentic ate() corey/pkg/ zed/upstream/ proliantutils/ .tox/py310/ lib/python3. 10/site- packages/ sushy/auth. py", line 57, in authenticate _do_authenticat e() corey/pkg/ zed/upstream/ proliantutils/ .tox/py310/ lib/python3. 10/site- packages/ sushy/auth. py", line 243, in _do_authenticate SessionOrBasicA uth, self)._ do_authenticate () corey/pkg/ zed/upstream/ proliantutils/ .tox/py3. ..
return func(*newargs, **newkeywargs)
File "/home/
self.hpe_sushy = main.HPESushy('https:/
File "/home/
super(HPESushy, self).__init__(
File "/home/
self.
File "/home/
self.
File "/home/
super(
File "/home/