Move unit tests and enable them for pull requests#291
Merged
Conversation
e276c95 to
6bdd72c
Compare
lukaszachy
approved these changes
Feb 9, 2024
Collaborator
|
Can you please rebase? |
Collaborator
|
@psss rebased here: https://github.com/sandrobonazzola/did/tree/psss-unit-tests , feel free to take from there. |
Owner
Author
|
Thanks, rebased and removed the extra |
sandrobonazzola
approved these changes
Jun 9, 2025
fdffdc0 to
d3862a8
Compare
aacad15 to
f475858
Compare
Collaborator
|
Looks like tests are failing accessing the local git repo: |
cdbb465 to
bb89df0
Compare
Filed #461 to track this.
The collect ignore does not work with older pytest:
```
File "/usr/lib/python3.9/site-packages/pluggy/manager.py", line 252, in _verify_hook
raise PluginValidationError(
pluggy.manager.PluginValidationError: Plugin '/var/ARTIFACTS/work-basiciy0u5a0r/plans/basic/discover/default-0/tests/conftest.py' for hook 'pytest_ignore_collect'
hookimpl definition: pytest_ignore_collect(collection_path, config) -> bool
Argument(s) {'collection_path'} are declared in the hookimpl but can not be found in the hookspec
```
Let's just skip centos stream for now.
```
/usr/lib64/python3.14/xmlrpc/client.py:1258: in send_request
connection.putrequest("POST", handler, skip_accept_encoding=True)
connection = <http.client.HTTPSConnection object at 0x7efc7c2f7e30>
debug = False
handler = '/rpc'
headers = []
host = 'localhost'
request_body = (b"<?xml version='1.0'?>\n<methodCall>\n<methodName>ticket.query</methodName>"
b'\n<params>\n<param>\n<value><string>time=..2026-03-31&modified=2026-03-'
b'30..&max=1000000</string></value>\n</param>\n</params>\n</methodCall>\n')
self = <xmlrpc.client.SafeTransport object at 0x7efc7bdd05f0>
self = <http.client.HTTPSConnection object at 0x7efc7c2f7e30>, method = 'POST'
url = '/rpc', skip_host = False, skip_accept_encoding = True
def putrequest(self, method, url, skip_host=False,
skip_accept_encoding=False):
"""Send a request to the server.
'method' specifies an HTTP request method, e.g. 'GET'.
'url' specifies the object being requested, e.g. '/index.html'.
'skip_host' if True does not add automatically a 'Host:' header
'skip_accept_encoding' if True does not add automatically an
'Accept-Encoding:' header
"""
# if a prior response has been completed, then forget about it.
if self.__response and self.__response.isclosed():
self.__response = None
# in certain cases, we cannot issue another request on this connection.
# this occurs when:
# 1) we are in the process of sending a request. (_CS_REQ_STARTED)
# 2) a response to a previous request has signalled that it is going
# to close the connection upon completion.
# 3) the headers for the previous response have not been read, thus
# we cannot determine whether point (2) is true. (_CS_REQ_SENT)
#
# if there is no prior response, then we can request at will.
#
# if point (2) is true, then we will have passed the socket to the
# response (effectively meaning, "there is no prior response"), and
# will open a new one when a new request is made.
#
# Note: if a prior response exists, then we *can* start a new request.
# We are not allowed to begin fetching the response to this new
# request, however, until that prior response is complete.
#
if self.__state == _CS_IDLE:
self.__state = _CS_REQ_STARTED
else:
> raise CannotSendRequest(self.__state)
E http.client.CannotSendRequest: Request-sent
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some unit tests need a special setup but most of them should be working without authentication. Let's enable at least the basic set for pull request testing.