Project

General

Profile

Actions

Bug #37314

closed

Refactor tests to delete distributions of protected repo versions

Added by Samir Jha about 1 month ago. Updated 5 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Some VCR tests fail as below:

Error:
Actions::Pulp3::RpmUploadTest#test_upload:
RuntimeError: Neutered Exception ForemanTasks::TaskError: Task e9a3a228-960e-4bfc-b217-0e92a62f9c2c: PulpRpmClient::ApiError: Error message: the server returns an error
HTTP status code: 400
Response headers: {"date"=>"Mon, 01 Apr 2024 17:19:42 GMT", "server"=>"gunicorn", "content-type"=>"application/json", "vary"=>"Accept,Cookie", "allow"=>"GET, DELETE, HEAD, OPTIONS", "x-frame-options"=>"DENY", "content-length"=>"174", "x-content-type-options"=>"nosniff", "referrer-policy"=>"same-origin", "cross-origin-opener-policy"=>"same-origin", "correlation-id"=>"792dd3fc653b42168de59218e1cf55d9", "access-control-expose-headers"=>"Correlation-ID", "via"=>"1.1 centos8-katello-devel-stable.example.com", "connection"=>"close"}
Response body: ["The repository version cannot be deleted because it (or its publications) are currently being used to distribute content. Please update the necessary distributions first."]
foreman-tasks (9.1.1) lib/foreman_tasks.rb:56:in `block in sync_task'
foreman-tasks (9.1.1) lib/foreman_tasks.rb:55:in `tap'
foreman-tasks (9.1.1) lib/foreman_tasks.rb:55:in `sync_task'
/home/vagrant/katello/test/actions/pulp3/orchestration/rpm_upload_test.rb:20:in `teardown'
/home/vagrant/katello/test/support/vcr.rb:24:in `block in run'
/home/vagrant/katello/test/support/vcr.rb:23:in `run'

This happens because pulpcore 3.49 adds protected repo versions where versions can not be deleted if there's a distributions attached to it directly or indirectly.

Actions #1

Updated by Samir Jha about 1 month ago

  • Subject changed from Refector tests to delete distributions of protected repo versions to Refactor tests to delete distributions of protected repo versions
Actions #2

Updated by Samir Jha about 1 month ago

  • Status changed from New to Closed

This will be taken care of as part of https://github.com/Katello/katello/pull/10949. Closing this out.

Actions #3

Updated by Samir Jha about 1 month ago

  • Triaged changed from No to Yes
Actions #4

Updated by Samir Jha about 1 month ago

  • Status changed from Closed to New

Reopening to track any katello action items around https://github.com/pulp/pulpcore/issues/5218

Actions #5

Updated by Samir Jha 5 days ago

This has been taken care of by refactoring a lot of tests to add cleanups as part of pulpcore upgrade. Closing this out.

Actions #6

Updated by Samir Jha 5 days ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF