Project

Profile

Help

Test #6605

closed

Re-enable test_sync_advisory_no_updated_date

Added by ppicka over 2 years ago. Updated 9 months ago.

Status:
CLOSED - DUPLICATE
Priority:
Low
Assignee:
Sprint/Milestone:
-
Version:
Platform Release:
Tags:
Sprint:
Sprint 111
Quarter:

Description

Ticket moved to GitHub: "pulp/pulp_rpm/2245":https://github.com/pulp/pulp_rpm/issues/2245


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'"
...}
Actions #1

Updated by ppicka over 2 years ago

  • Description updated (diff)
Actions #2

Updated by ppicka over 2 years 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
Actions #3

Updated by ppicka over 2 years ago

  • Description updated (diff)
Actions #4

Updated by ttereshc over 2 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by dalley over 1 year 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.

Actions #6

Updated by dalley over 1 year 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)
Actions #7

Updated by dalley about 1 year ago

  • Sprint set to Sprint 101
Actions #8

Updated by ipanova@redhat.com about 1 year ago

  • Sprint changed from Sprint 101 to Sprint 102
Actions #9

Updated by rchan about 1 year ago

  • Sprint changed from Sprint 102 to Sprint 103
Actions #10

Updated by rchan about 1 year ago

  • Sprint changed from Sprint 103 to Sprint 104
Actions #11

Updated by dalley about 1 year ago

  • Priority changed from Normal to Low
Actions #12

Updated by rchan about 1 year ago

  • Sprint changed from Sprint 104 to Sprint 105
Actions #13

Updated by rchan about 1 year ago

  • Sprint changed from Sprint 105 to Sprint 106
Actions #14

Updated by rchan 12 months ago

  • Sprint changed from Sprint 106 to Sprint 107
Actions #15

Updated by dalley 12 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #16

Updated by rchan 11 months ago

  • Sprint changed from Sprint 107 to Sprint 108
Actions #17

Updated by rchan 11 months ago

  • Sprint changed from Sprint 108 to Sprint 109
Actions #18

Updated by rchan 10 months ago

  • Sprint changed from Sprint 109 to Sprint 110
Actions #19

Updated by rchan 10 months ago

  • Sprint changed from Sprint 110 to Sprint 111
Actions #20

Updated by pulpbot 9 months ago

  • Description updated (diff)
  • Status changed from ASSIGNED to CLOSED - DUPLICATE

Also available in: Atom PDF