Skip to content

Commit

Permalink
Fixes #37277 - Fix ACS randomly failing VCR tests (#10941)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Mar 18, 2024
1 parent 02fc313 commit 6d93801
Show file tree
Hide file tree
Showing 19 changed files with 5,194 additions and 3,983 deletions.
4 changes: 2 additions & 2 deletions app/services/katello/pulp3/alternate_content_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def create
if acs.content_type == ::Katello::Repository::FILE_TYPE && acs.subpaths.present?
paths = insert_pulp_manifest!(paths)
end
response = api.alternate_content_source_api.create(name: generate_backend_object_name, paths: paths,
response = api.alternate_content_source_api.create(name: generate_backend_object_name, paths: paths.sort,
remote: smart_proxy_acs.remote_href)
smart_proxy_acs.update!(alternate_content_source_href: response.pulp_href)
return response
Expand All @@ -125,7 +125,7 @@ def update
if acs.content_type == ::Katello::Repository::FILE_TYPE && acs.subpaths.present?
paths = insert_pulp_manifest!(paths)
end
api.alternate_content_source_api.update(href, name: generate_backend_object_name, paths: paths, remote: smart_proxy_acs.remote_href)
api.alternate_content_source_api.update(href, name: generate_backend_object_name, paths: paths.sort, remote: smart_proxy_acs.remote_href)
end

def delete_alternate_content_source
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ def test_promote_multiple
def test_bad_promote_out_of_sequence
version = @library_dev_staging_view.versions.first
@controller.expects(:async_task).with(::Actions::Katello::ContentView::Promote, version, [@beta], false, nil).
raises(::Katello::HttpErrors::BadRequest)
raises(::Katello::HttpErrors::BadRequest.new('Cannot promote environment out of sequence. Use force to bypass restriction.'))
post :promote, params: { :id => version.id, :environment_ids => [@beta.id] }

assert_response 500
assert_response 400
end

def test_promote_out_of_sequence_force
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d93801

Please sign in to comment.