Project

Profile

Help

Test #6605

Re-enable test_sync_advisory_no_updated_date

Added by ppicka over 1 year ago. Updated 3 days ago.

Status:
NEW
Priority:
Low
Assignee:
-
Sprint/Milestone:
-
Version:
Platform Release:
Tags:
Sprint:
Sprint 106
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
  1. create repository
  2. sync remote rpm-unsigned
  3. re-sync same repo with rpm-advisory-no-update-date remote
"error" {
"description": "'<' not supported between instances of 'datetime.datetime' and 'NoneType'"
...}

History

#1 Updated by ppicka over 1 year ago

  • Description updated (diff)

#2 Updated by ppicka over 1 year ago

  • Subject changed from As user I can sync advisories with missing updated_date to updated advisories with missing updated_date can cause sync failure

#3 Updated by ppicka over 1 year ago

  • Description updated (diff)

#4 Updated by ttereshc over 1 year ago

  • Triaged changed from No to Yes

#5 Updated by dalley 8 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 7 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)

#7 Updated by dalley 2 months ago

  • Sprint set to Sprint 101

#8 Updated by ipanova@redhat.com about 2 months ago

  • Sprint changed from Sprint 101 to Sprint 102

#9 Updated by rchan about 1 month ago

  • Sprint changed from Sprint 102 to Sprint 103

#10 Updated by rchan 30 days ago

  • Sprint changed from Sprint 103 to Sprint 104

#11 Updated by dalley 25 days ago

  • Priority changed from Normal to Low

#12 Updated by rchan 17 days ago

  • Sprint changed from Sprint 104 to Sprint 105

#13 Updated by rchan 3 days ago

  • Sprint changed from Sprint 105 to Sprint 106

Please register to edit this issue

Also available in: Atom PDF