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

Added basic tests for 'packages_directory' feature. #312

Closed

Conversation

midnightercz
Copy link
Contributor

Module: pulp_smash.tests.rpm.api_v2.test_packages.directory
TestCase: PackagesDirectoryTestCase

  • tests if default location of published packages
  • tests custom location of published packages

Fix: #300

Module: pulp_smash.tests.rpm.api_v2.test_packages.directory
TestCase: PackagesDirectoryTestCase
 - tests if default location of published packages
 - tests custom location of published packages

Fix: pulp#300
@coveralls
Copy link

coveralls commented Jun 20, 2016

Coverage Status

Changes Unknown when pulling 1c137e3 on release-engineering:test_packages_directory into * on PulpQE:master*.

@Ichimonji10 Ichimonji10 self-assigned this Jul 1, 2016
@Ichimonji10
Copy link
Contributor

This test passes, but it doesn't actually test whether the packages_directory feature works or not. The problem lies with this snippet of code:

packages_locations = get_locations(self.responses['publish2_xml'])
for location in packages_locations:
    self.assertEqual(os.path.dirname(location), 'Packages')

This bit of code assumes that several packages_locations have been found. However, due to the way get_locations is implemented, packages_locations is an empty list.

I believe the fix is to use different namespaces in the XPath expressions. I'll try it out tomorrow, and if it works, will use the fix in a follow-up commit.

@Ichimonji10
Copy link
Contributor

I've taken a good, close look at the code, and there's a few things that need to be fixed up. Given how much time I've spent looking at the code, and how much time I've spent toying around with new solutions, I'll work on coming up with additional commits that satisfy my concerns.

@Ichimonji10
Copy link
Contributor

Superseded by #331.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants