Bug 626459 - Tests don't properly clean up after themselves
Summary: Tests don't properly clean up after themselves
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
high
high
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL:
Whiteboard:
Keywords: QA-Closed
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-23 15:36 UTC by Jay Dobies
Modified: 2011-07-15 19:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-20 16:11:29 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Jay Dobies 2010-08-23 15:36:18 UTC
After running the tests I see temp files created and not cleaned up. They show up as unmodified files when doing a git status.

# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	data/sameNEVRA_differentChecksums/A/repo/temp_repo-1282576740.71/
#	data/sameNEVRA_differentChecksums/A/repo/temp_repo-1282576740.78/

Comment 1 Jay Dobies 2010-09-22 14:13:04 UTC
commit	6a39d8b55e1578dddccb935a6412fdd7b8799a48
tree	4bab31bc223e24621b31f7fdc3c16bddb19eda47


626459 - The temporary yum file should be placed in the /tmp directory.


src/pulp/server/util.py

Comment 2 Preethi Thomas 2010-10-06 18:52:48 UTC
verified

[root@preethi test]# git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       ../log-grinder.out
#       ../pulp.bak
#       ../pulp.log
#       ../src/pulp.log
#       ../src/pulptools/
nothing added to commit but untracked files present (use "git add" to track)
[root@preethi test]# 
[root@preethi test]# 
[root@preethi test]# nosetests -s -w unit/
......Package! {'vendor': None, 'name': 'pulp-test-package', 'checksum': {'sha256': '9d05cc3dbdc94150966f66d76488a3ed34811226735e56dc3e7a721de194b42e'}, 'requires': [], 'download_url': None, 'filename': 'test-filename-1.2.3-1.el5.x86_64.rpm', 'epoch': None, 'version': '0.3.1', 'provides': [], '_ns': u'packages', 'release': '1.fc11', '_id': '1a39684f-c79a-4103-ac60-bc695e6fee82', 'arch': 'x86_64', 'id': '1a39684f-c79a-4103-ac60-bc695e6fee82', 'description': 'test description text'}
.Consumer group tests:
some description
.........{u'use_symlinks': False, u'sync_schedule': None, u'ca': None, u'id': u'some-id', u'repomd_xml_path': u'', u'source': {u'url': u'http://example.com', u'type': u'yum', u'supported_types': [u'yum', u'local', u'rhn']}, u'group_xml_path': u'', u'groupid': [], u'packagegroups': {}, u'files': [], u'relative_path': u'', u'arch': u'i386', u'key': None, u'packages': {}, u'group_gz_xml_path': u'', u'name': u'some name', u'last_sync': None, u'cert': None, u'packagegroupcategories': {}, u'_ns': u'repos', u'_id': u'some-id', u'errata': {}}
.Repo: {'use_symlinks': False, 'sync_schedule': None, 'ca': None, 'id': 'some-id', 'repomd_xml_path': '', 'group_xml_path': '', 'source': {'url': 'file:///root/pulp/test/unit/data/', 'type': 'local', 'supported_types': ['yum', 'local', 'rhn']}, 'groupid': [], 'files': [], 'packagegroups': {}, 'relative_path': '/root/pulp/test/unit/data/', 'arch': 'i386', 'key': None, 'packages': {}, 'group_gz_xml_path': '', 'name': 'some name', 'last_sync': None, 'cert': None, 'packagegroupcategories': {}, '_ns': u'repos', '_id': 'some-id', 'errata': {}}
SON([(u'3a57899f-fd9f-41cc-b604-67e172cf43ba', SON([(u'vendor', None), (u'name', u'pulp-test-non-ascii-chars-package'), (u'checksum', SON([(u'sha256', u'8264d7524cb8c10a6b7aa270eb3f491e97fac483f4034dfdf897ff57465e3ff3')])), (u'download_url', u'http://localhost//pub/some-id/pulp-test-non-ascii-chars-package-0.1.0-1.fc12.noarch.rpm'), (u'filename', u'pulp-test-non-ascii-chars-package-0.1.0-1.fc12.noarch.rpm'), (u'epoch', u'0'), (u'version', u'0.1.0'), (u'arch', u'noarch'), (u'provides', [u'pulp-test-non-ascii-chars-package', u'config(pulp-test-non-ascii-chars-package)']), (u'_ns', u'packages'), (u'release', u'1.fc12'), (u'_id', u'3a57899f-fd9f-41cc-b604-67e172cf43ba'), (u'requires', []), (u'id', u'3a57899f-fd9f-41cc-b604-67e172cf43ba'), (u'description', u'Test package.  Nothing to see here.\nNot ascii chars Linux\xae')])), (u'61e4bcee-e971-41ad-a5c4-b716d8538913', SON([(u'vendor', None), (u'name', u'pulp-test-package-same-nevra'), (u'checksum', SON([(u'sha256', u'f2a34b9756244cb78bfa1d04b12e08da28aeefa19a47ea9e199b18c6fc18c143')])), (u'download_url', u'http://localhost//pub/some-id/pulp-test-package-same-nevra-0.1.0-1.x86_64.rpm'), (u'filename', u'pulp-test-package-same-nevra-0.1.0-1.x86_64.rpm'), (u'epoch', u'0'), (u'version', u'0.1.0'), (u'arch', u'x86_64'), (u'provides', [u'pulp-test-package-same-nevra(x86-64)', u'pulp-test-package-same-nevra', u'config(pulp-test-package-same-nevra)']), (u'_ns', u'packages'), (u'release', u'1'), (u'_id', u'61e4bcee-e971-41ad-a5c4-b716d8538913'), (u'requires', []), (u'id', u'61e4bcee-e971-41ad-a5c4-b716d8538913'), (u'description', u'Test package.  Nothing to see here.')])), (u'59b51bb5-1611-416a-b391-50c6c215a8ee', SON([(u'vendor', None), (u'name', u'pulp-test-package'), (u'checksum', SON([(u'sha256', u'6bce3f26e1fc0fc52ac996f39c0d0e14fc26fb8077081d5b4dbfb6431b08aa9f')])), (u'download_url', u'http://localhost//pub/some-id/pulp-test-package-0.3.1-1.fc11.x86_64.rpm'), (u'filename', u'pulp-test-package-0.3.1-1.fc11.x86_64.rpm'), (u'epoch', u'0'), (u'version', u'0.3.1'), (u'arch', u'x86_64'), (u'provides', [u'pulp-test-package(x86-64)', u'pulp-test-package', u'config(pulp-test-package)']), (u'_ns', u'packages'), (u'release', u'1.fc11'), (u'_id', u'59b51bb5-1611-416a-b391-50c6c215a8ee'), (u'requires', []), (u'id', u'59b51bb5-1611-416a-b391-50c6c215a8ee'), (u'description', u'Test package.  Nothing to see here.')])), (u'ad4baa22-cb27-4b11-9169-89d961fa6e05', SON([(u'vendor', None), (u'name', u'pulp-test-package'), (u'checksum', SON([(u'sha256', u'4dbde07b4a8eab57e42ed0c9203083f1d61e0b13935d1a569193ed8efc9ecfd7')])), (u'download_url', u'http://localhost//pub/some-id/pulp-test-package-0.2.1-1.fc11.x86_64.rpm'), (u'filename', u'pulp-test-package-0.2.1-1.fc11.x86_64.rpm'), (u'epoch', u'0'), (u'version', u'0.2.1'), (u'arch', u'x86_64'), (u'provides', [u'pulp-test-package(x86-64)', u'pulp-test-package', u'config(pulp-test-package)']), (u'_ns', u'packages'), (u'release', u'1.fc11'), (u'_id', u'ad4baa22-cb27-4b11-9169-89d961fa6e05'), (u'requires', []), (u'id', u'ad4baa22-cb27-4b11-9169-89d961fa6e05'), (u'description', u'Test package.  Nothing to see here.')])), (u'1ce05000-0e5b-4dd1-adf0-337cef357d3b', SON([(u'vendor', None), (u'name', u'pulp-test-package-same-nevra'), (u'checksum', SON([(u'sha256', u'6d4fabe94afb3df70643b5102c05936b3d502c3297c5d05c36a91d58f1634d0a')])), (u'download_url', u'http://localhost//pub/some-id/pulp-test-package-same-nevra-0.1.0-1.src.rpm'), (u'filename', u'pulp-test-package-same-nevra-0.1.0-1.src.rpm'), (u'epoch', u'0'), (u'version', u'0.1.0'), (u'arch', u'src'), (u'provides', []), (u'_ns', u'packages'), (u'release', u'1'), (u'_id', u'1ce05000-0e5b-4dd1-adf0-337cef357d3b'), (u'requires', []), (u'id', u'1ce05000-0e5b-4dd1-adf0-337cef357d3b'), (u'description', u'Test package.  Nothing to see here.')])), (u'3bf41c29-b465-4f59-acec-97dfe51842ad', SON([(u'vendor', None), (u'name', u'pulp-dot-2.0-test'), (u'checksum', SON([(u'sha256', u'435d92e6c09248b501b8d2ae786f92ccfad69fab8b1bc774e2b66ff6c0d83979')])), (u'download_url', u'http://localhost//pub/some-id/pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm'), (u'filename', u'pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm'), (u'epoch', u'0'), (u'version', u'0.1.2'), (u'arch', u'x86_64'), (u'provides', [u'pulp-dot-2.0-test(x86-64)', u'pulp-dot-2.0-test', u'config(pulp-dot-2.0-test)']), (u'_ns', u'packages'), (u'release', u'1.fc11'), (u'_id', u'3bf41c29-b465-4f59-acec-97dfe51842ad'), (u'requires', []), (u'id', u'3bf41c29-b465-4f59-acec-97dfe51842ad'), (u'description', u'Test package to see how we deal with packages with dots in the name')]))])
.Package! {'vendor': None, 'name': 'test_package_versions_name', 'checksum': {'sha256': '9d05cc3dbdc94150966f66d76488a3ed34811226735e56dc3e7a721de194b42e'}, 'requires': [], 'download_url': None, 'filename': 'test-filename-1.2.3-1.el5.x86_64.rpm', 'epoch': '1', 'version': '1.2.3', 'provides': [], '_ns': u'packages', 'release': '1.el5', '_id': '97bb2a0e-9d53-455e-a9f1-d04e012edc30', 'arch': 'x86_64', 'id': '97bb2a0e-9d53-455e-a9f1-d04e012edc30', 'description': 'test description text'}
.......Repo source: SON([(u'url', u'http://example2.com'), (u'type', u'yum'), (u'supported_types', [u'yum', u'local', u'rhn'])])
...................................................Package! {'vendor': None, 'name': 'pulp-test-package', 'checksum': {'sha256': '9d05cc3dbdc94150966f66d76488a3ed34811226735e56dc3e7a721de194b42e'}, 'requires': [], 'download_url': None, 'filename': 'test-filename-0.3.1-1.fc11.x86_64.rpm', 'epoch': None, 'version': '0.3.1', 'provides': [], '_ns': u'packages', 'release': '1.fc11', '_id': 'ec728430-d709-41ac-b797-a65f8ffca7ec', 'arch': 'x86_64', 'id': 'ec728430-d709-41ac-b797-a65f8ffca7ec', 'description': 'test description text'}
.......................E.{u'repo-4': None, u'repo-1': u'1 * * * *', u'repo-3': None, u'repo-2': u'2 * * * *'}
..Update #1 [* * * * * python /root/pulp/test/unit/../../src/pulp/server/api/repo.py --repoid=repo-sync-schedule]
Update #2 [2 2 2 2 2 python /root/pulp/test/unit/../../src/pulp/server/api/repo.py --repoid=repo-sync-schedule]
..some_other_method executed
..some method executed
some_other_method3 executed
..some_other_method executed
...................................
======================================================================
ERROR: test_create_product_repo (test_product_repo.TestProductRepo)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/pulp/test/unit/test_product_repo.py", line 63, in test_create_product_repo
    self.rapi.create_product_repo(content_set, cert_data, groupid="test-product")
  File "/root/pulp/test/unit/../../src/pulp/server/auditing.py", line 193, in _audit
    result = method(*args, **kwargs)
  File "/root/pulp/test/unit/../../src/pulp/server/api/repo.py", line 170, in create_product_repo
    serv.connect()
  File "/root/pulp/test/unit/../../src/pulp/server/api/fetch_listings.py", line 35, in connect
    context.load_cert(self.cert, keyfile=self.key)
  File "/usr/lib64/python2.6/site-packages/M2Crypto/SSL/Context.py", line 74, in load_cert
    m2.ssl_ctx_use_cert(self.ctx, certfile)
SSLError: no start line
-------------------- >> begin captured logging << --------------------
pulp.server.api.repo: ERROR: storing file /etc/pki/content/test-product/test-product.ca
pulp.server.api.repo: ERROR: storing file /etc/pki/content/test-product/test-product.cert
pulp.server.api.repo: ERROR: storing file /etc/pki/content/test-product/test-product.key
auditing: INFO: [2010-10-06 14:57:40.846333] Admin called RepoApi.create_product_repo on groupid: test-product, content_set: [{'content_set_label': 'rhel-server', 'content_rel_url': '/content/dist/rhel/server/$releasever/$basearch/os'}]
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 144 tests in 50.643s

FAILED (errors=1)
[root@preethi test]# git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       ../log-grinder.out
#       ../pulp.bak
#       ../pulp.log
#       ../src/pulp.log
#       ../src/pulptools/
nothing added to commit but untracked files present (use "git add" to track)
[root@preethi test]#

Comment 3 Preethi Thomas 2010-10-20 16:11:29 UTC
Closed after review.


Note You need to log in before you can comment on or make changes to this bug.