Test #6605
Re-enable test_sync_advisory_no_updated_date
Status:
NEW
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Version:
Platform Release:
Tags:
Sprint:
Quarter:
Description
If advisory has same ID, version but update_date missing sync will fail.
If updated_date missing in advisory issued_date is not take into consideration in advisory conflict resolution time.
How to reproduce:
git clone https://github.com/pulp/pulp-fixtures
cd pulp-fixtures
# create fixtures
make fixtures/rpm-unsigned
make fixtures/rpm-advisory-no-update-date
- create repository
- sync remote rpm-unsigned
- re-sync same repo with rpm-advisory-no-update-date remote
"error" {
"description": "'<' not supported between instances of 'datetime.datetime' and 'NoneType'"
...}
History
#5
Updated by dalley 2 months ago
Here's a diff to even be able to test this, it looks like the fixture URL is wrong.
diff --git a/pulp_rpm/tests/functional/api/test_sync.py b/pulp_rpm/tests/functional/api/test_sync.py
index 9e1be88c..210bf808 100644
--- a/pulp_rpm/tests/functional/api/test_sync.py
+++ b/pulp_rpm/tests/functional/api/test_sync.py
@@ -28,7 +28,7 @@ from pulp_rpm.tests.functional.constants import (
RPM_ADVISORY_DIFFERENT_PKGLIST_URL,
RPM_ADVISORY_DIFFERENT_REPO_URL,
RPM_ADVISORY_INCOMPLETE_PKG_LIST_URL,
- RPM_ADVISORY_NO_DATES,
+ RPM_ADVISORY_NO_UPDATED_DATE,
RPM_ADVISORY_TEST_ADDED_COUNT,
RPM_ADVISORY_TEST_ID,
RPM_ADVISORY_TEST_ID_NEW,
@@ -854,7 +854,6 @@ class BasicSyncTestCase(PulpTestCase):
self.assertIn(error_msg, task_result["error"]["description"])
- @unittest.skip("FIXME: Enable this test after https://pulp.plan.io/issues/6605 is fixed")
def test_sync_advisory_no_updated_date(self):
"""Test sync advisory with no update.
@@ -871,7 +870,7 @@ class BasicSyncTestCase(PulpTestCase):
# add remote to clean up
self.addCleanup(self.remote_api.delete, remote.pulp_href)
- body = gen_rpm_remote(RPM_ADVISORY_NO_DATES)
+ body = gen_rpm_remote(RPM_ADVISORY_NO_UPDATED_DATE)
remote = self.remote_api.create(body)
# re-sync
diff --git a/pulp_rpm/tests/functional/constants.py b/pulp_rpm/tests/functional/constants.py
index fee2331b..6529638c 100644
--- a/pulp_rpm/tests/functional/constants.py
+++ b/pulp_rpm/tests/functional/constants.py
@@ -258,9 +258,9 @@ in the standard unsigned rpm repository, but pkglist intersection is non-empty a
to either pkglist.
"""
-RPM_ADVISORY_NO_DATES = urljoin(PULP_FIXTURES_BASE_URL, "rpm-advisory-no-dates")
+RPM_ADVISORY_NO_UPDATED_DATE = urljoin(PULP_FIXTURES_BASE_URL, "rpm-advisory-no-update-date")
"""The URL to a repository containing Advisories with same id and version as the ones
-in the standard unsigned rpm repository, but no update_date or issue_date.
+in the standard unsigned rpm repository, but no updated_date.
"""
RPM_ADVISORY_TEST_ID = "RHEA-2012:0056"
What I see is that the original sync failure no longer exists (probably fixed by https://pulp.plan.io/issues/8162) (assuming that the smash test fully captures the issue), but the test expectations still aren't satisfied. The new errata is added but the old errata is not removed.
#6
Updated by dalley about 2 months ago
- Tracker changed from Issue to Test
- Subject changed from updated advisories with missing updated_date can cause sync failure to Re-enable test_sync_advisory_no_updated_date
- Severity deleted (
2. Medium) - Triaged deleted (
Yes) - Groomed deleted (
No) - Sprint Candidate deleted (
No)
Please register to edit this issue