Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btest fails in Vagrant environment #2859

Closed
jeremycline opened this issue Dec 17, 2018 · 4 comments
Closed

btest fails in Vagrant environment #2859

jeremycline opened this issue Dec 17, 2018 · 4 comments
Labels
Crash Issues related to an unhandled crash EasyFix These are good issues to get started with if you are new to the project High priority These issues are higher priority than normal Tests Issues pertaining to Bodhi's tests

Comments

@jeremycline
Copy link
Member

While checking my work on #2858 I found that the tests in the Vagrant environment fail because a non-ascii character is used without a character encoding declared in a number of files:

/usr/lib/python2.7/site-packages/py/_path/common.py:377: in visit
    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/usr/lib/python2.7/site-packages/py/_path/common.py:429: in gen
    for p in self.gen(subdir):
/usr/lib/python2.7/site-packages/py/_path/common.py:429: in gen
    for p in self.gen(subdir):
/usr/lib/python2.7/site-packages/py/_path/common.py:429: in gen
    for p in self.gen(subdir):
/usr/lib/python2.7/site-packages/py/_path/common.py:419: in gen
    if p.check(dir=1) and (rec is None or rec(p))])
/usr/lib/python2.7/site-packages/_pytest/main.py:511: in _recurse
    ihook = self.gethookproxy(path)
/usr/lib/python2.7/site-packages/_pytest/main.py:413: in gethookproxy
    my_conftestmodules = pm._getconftestmodules(fspath)
/usr/lib/python2.7/site-packages/_pytest/config/__init__.py:386: in _getconftestmodules
    mod = self._importconftest(conftestpath)
/usr/lib/python2.7/site-packages/_pytest/config/__init__.py:417: in _importconftest
    raise ConftestImportFailure(conftestpath, sys.exc_info())
E   ConftestImportFailure: SyntaxError("Non-ASCII character '\\xc2' in file /home/vagrant/bodhi/devel/ci/integration/tests/fixtures/backend.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details", ('/home/vagrant/bodhi/devel/ci/integration/tests/fixtures/backend.py', 1, 0, None))
E     File "/usr/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 226, in load_module
E       py.builtin.exec_(co, mod.__dict__)
E     File "/usr/lib/python2.7/site-packages/py/_builtin.py", line 221, in exec_
E       exec2(obj, globals, locals)
E     File "<string>", line 7, in exec2
E     File "/home/vagrant/bodhi/devel/ci/integration/tests/conftest.py", line 21, in <module>
E       from .fixtures.backend import docker_backend, docker_network

This is only a problem in Python 2. Was the plan to drop Python 2 support? If so I think the fix here is to just drop that from btest.

@bowlofeggs
Copy link
Contributor

Ah I know what the problem is - the new integration test suite itself is Python 3 only, and btest uses the path /home/vagrant/bodhi to find tests, rather than /home/vagrant/bodhi/bodhi/tests. Easy fix!

@bowlofeggs bowlofeggs added EasyFix These are good issues to get started with if you are new to the project High priority These issues are higher priority than normal Tests Issues pertaining to Bodhi's tests Crash Issues related to an unhandled crash labels Dec 17, 2018
sebwoj added a commit to sebwoj/bodhi that referenced this issue Dec 18, 2018
Fixes fedora-infra#2859

Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com>
sebwoj added a commit to sebwoj/bodhi that referenced this issue Dec 29, 2018
Fixes fedora-infra#2859

Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com>
bowlofeggs pushed a commit to sebwoj/bodhi that referenced this issue Jan 3, 2019
Fixes fedora-infra#2859

Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com>
bowlofeggs pushed a commit to sebwoj/bodhi that referenced this issue Jan 4, 2019
Fixes fedora-infra#2859

Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com>
mergify bot pushed a commit that referenced this issue Jan 5, 2019
Fixes #2859

Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com>
@sebwoj
Copy link
Collaborator

sebwoj commented Jan 8, 2019

@bowlofeggs Can we close this issue? I have no idea why mergify skip closing it.

@bowlofeggs
Copy link
Contributor

@sebwoj Mergify doesn't close issues, GitHub does. I see that the commit message says "Fixes #2859", but the pull request (#2866) doesn't. Perhaps GitHub only closes issues if the pull request description has that text? Not sure.

Either way, it is good to use that text in both the commit message and pull request description so the git log has it and so the pull request is linked to the issue (though it's not hard to get from the commit to the associated pull request).

@sebwoj
Copy link
Collaborator

sebwoj commented Jan 11, 2019

Either way, it is good to use that text in both the commit message and pull request description so the git log has it and so the pull request is linked to the issue (though it's not hard to get from the commit to the associated pull request).

Good to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crash Issues related to an unhandled crash EasyFix These are good issues to get started with if you are new to the project High priority These issues are higher priority than normal Tests Issues pertaining to Bodhi's tests
Projects
None yet
Development

No branches or pull requests

3 participants