Opened 7 years ago

Closed 7 years ago

#4780 defect closed duplicate (duplicate)

Twisted 10.2.0: Test failures with root permissions

Reported by: Arfrever Frehtes Taifersar Arahesis Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

Some tests in Twisted 10.2.0 fail when they are run under root. All these tests pass when they are run under normal user.

Twisted Core 10.2.0:

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/twisted-10.2.0/temp/tests/usr/lib64/python2.6/site-packages/twisted/test/test_plugin.py", line 541, in test_newPluginsOnReadOnlyPath
    self.assertEqual(len(self.flushLoggedErrors()), 1)
twisted.trial.unittest.FailTest: not equal:
a = 0
b = 1


twisted.test.test_plugin.DeveloperSetupTests.test_newPluginsOnReadOnlyPath
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/twisted-10.2.0/temp/tests/usr/lib64/python2.6/site-packages/twisted/test/test_plugin.py", line 321, in test_deployedMode
    self.assertEquals(len(errors), 1)
twisted.trial.unittest.FailTest: not equal:
a = 0
b = 1


twisted.test.test_plugin.PluginTestCase.test_deployedMode
-------------------------------------------------------------------------------

Twisted Conch 10.2.0:

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/twisted-conch-10.2.0/temp/usr/lib64/python2.6/site-packages/twisted/conch/test/test_checkers.py", line 117, in test_checkKeyAsRoot
    self.assertEquals(self.mockos.seteuidCalls, [0, 1, 0, os.getuid()])
twisted.trial.unittest.FailTest: not equal:
a = []
b = [0, 1, 0, 0]


twisted.conch.test.test_checkers.SSHPublicKeyDatabaseTestCase.test_checkKeyAsRoot
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/twisted-conch-10.2.0/temp/usr/lib64/python2.6/site-packages/twisted/conch/test/test_openssh_compat.py", line 101, in test_getPrivateKeysAsRoot
    self.assertEquals(self.mockos.seteuidCalls, [0, os.geteuid()])
twisted.trial.unittest.FailTest: not equal:
a = []
b = [0, 0]


twisted.conch.test.test_openssh_compat.OpenSSHFactoryTests.test_getPrivateKeysAsRoot
-------------------------------------------------------------------------------

Twisted Web 10.2.0:

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/twisted-web-10.2.0/temp/usr/lib64/python2.6/site-packages/twisted/web/test/test_static.py", line 147, in cbRendered
    self.assertEqual(request.responseCode, 403)
twisted.trial.unittest.FailTest: not equal:
a = 200
b = 403


twisted.web.test.test_static.StaticFileTests.test_forbiddenResource
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/twisted-web-10.2.0/temp/usr/lib64/python2.6/site-packages/twisted/trial/unittest.py", line 421, in _cb
    "did not catch an error, instead got %r" % (ignore,))
twisted.trial.unittest.FailTest: did not catch an error, instead got None

twisted.web.test.test_webclient.WebClientSSLTestCase.testDownloadPageError3
twisted.web.test.test_webclient.WebClientTestCase.testDownloadPageError3
-------------------------------------------------------------------------------

Change History (2)

comment:1 Changed 7 years ago by Glyph

Resolution: duplicate
Status: newclosed

Thanks for your report.

This is a duplicate of #3787 though, so future notes about this issue should go there.

comment:2 Changed 7 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.