Skip to content

Commit

Permalink
Skip tests affected by bug 695
Browse files Browse the repository at this point in the history
Skip test `CreateSuccessTestCase.test_location_header` in module
`pulp_smash.tests.platform.api_v2.test_repository` if Pulp 2.6 or older is
targeted.

Test suite results do not change when run against Pulp 2.7 (and the Pulp Smash
settings file is configured appropriately). This fixes two failing tests when
run against Pulp 2.6.

Test results before this change:

    $ PULP_SMASH_CONFIG_FILE=pulp-2.6.json python -m unittest2 \
    >   pulp_smash.tests.platform.api_v2.test_repository
    …
    Ran 11 tests in 1.947s

    FAILED (failures=8)

Test results with this change applied:

    $ PULP_SMASH_CONFIG_FILE=pulp-2.6.json python -m unittest2 \
    >   pulp_smash.tests.platform.api_v2.test_repository
    …
    Ran 11 tests in 1.961s

    FAILED (failures=6, skipped=1)
  • Loading branch information
Ichimonji10 committed Dec 4, 2015
1 parent f433b1c commit c0b568a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pulp_smash/tests/platform/api_v2/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from pulp_smash.config import get_config
from pulp_smash.constants import REPOSITORY_PATH, ERROR_KEYS
from pulp_smash.utils import create_repository, delete, uuid4
from pulp_smash.utils import create_repository, delete, require, uuid4
from requests.exceptions import HTTPError
from unittest2 import TestCase

Expand Down Expand Up @@ -54,6 +54,7 @@ def test_status_code(self):
with self.subTest(self.bodies[i]):
self.assertEqual(response.status_code, 201)

@require('2.7') # https://pulp.plan.io/issues/695
def test_location_header(self):
"""Assert that the Location header is correctly set in the response."""
for response, attrs in zip(self.responses, self.attrs_iter):
Expand Down

0 comments on commit c0b568a

Please sign in to comment.