Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37099 - Update repo fixture URL to Pulp hosted for tests #10917

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_yum_refresh_simplified
::Katello::Pulp3::Repository.any_instance.stubs(:generate_backend_object_name).returns(@yum_simplified_acs.name)
::Katello::Pulp3::AlternateContentSource.any_instance.stubs(:generate_backend_object_name).returns(@yum_simplified_acs.name)
repo = katello_repositories(:fedora_17_x86_64_duplicate)
repo.root.update!(url: 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
repo.root.update!(url: 'https://fixtures.pulpproject.org/rpm-no-comps/')
smart_proxy_acs = ::Katello::SmartProxyAlternateContentSource.create(alternate_content_source_id: @yum_simplified_acs.id, smart_proxy_id: @primary.id, repository_id: repo.id)
ForemanTasks.sync_task(::Actions::Pulp3::Orchestration::AlternateContentSource::Create, smart_proxy_acs)
ForemanTasks.sync_task(::Actions::Pulp3::Orchestration::AlternateContentSource::Refresh, smart_proxy_acs)
Expand Down
6 changes: 3 additions & 3 deletions test/actions/pulp3/orchestration/copy_all_units_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ def setup
@primary = SmartProxy.pulp_primary
@repo = katello_repositories(:fedora_17_x86_64_duplicate)
@repo.update!(:environment_id => nil)
@repo.root.update!(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update!(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')
@repo_clone = katello_repositories(:fedora_17_x86_64_dev)
@repo_clone.update!(:environment_id => nil)
@repo_clone.root.update!(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo_clone.root.update!(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')

ensure_creatable(@repo, @primary)
create_repo(@repo, @primary)
Expand Down Expand Up @@ -601,7 +601,7 @@ def test_module_streams_copied_from_actual_source_repo
FactoryBot.create(:katello_content_view_module_stream_filter_rule,
:filter => filter,
:module_stream => duck)
@repo.root.update!(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update!(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')

sync_args = {:smart_proxy_id => @primary.id, :repo_id => @repo.id}
ForemanTasks.sync_task(::Actions::Pulp3::Orchestration::Repository::Sync, @repo, @primary, sync_args)
Expand Down
2 changes: 1 addition & 1 deletion test/actions/pulp3/orchestration/export_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def setup
Setting[:ssl_priv_key] = '/etc/foreman/client_key.pem'
@primary = SmartProxy.pulp_primary
@repo = katello_repositories(:fedora_17_x86_64_duplicate)
@repo.root.update!(url: 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update!(url: 'https://fixtures.pulpproject.org/rpm-no-comps/')
@repo = create_and_sync(@repo, @primary)
@content_view = @repo.content_view
@content_view_version = @repo.content_view_version
Expand Down
34 changes: 21 additions & 13 deletions test/actions/pulp3/orchestration/multi_copy_all_units_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ def setup
@primary = SmartProxy.pulp_primary
@repo = katello_repositories(:fedora_17_x86_64_duplicate)
@repo.update!(:environment_id => nil)
@repo.root.update!(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update!(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')
@repo_clone = katello_repositories(:fedora_17_x86_64_dev)
@repo_clone.update!(:environment_id => nil)
@repo_clone.root.update!(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo_clone.root.update!(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')

::Katello::Repository.any_instance.stubs(:soft_copy_of_library?).returns(false)

Expand Down Expand Up @@ -66,7 +66,6 @@ def test_yum_copy_with_errata_exclusion_filter
@repo_clone.reload

refute_includes @repo_clone.rpms.pluck(:name), "crow"
refute_includes @repo_clone.rpms.pluck(:name), "duck"
refute_includes @repo_clone.rpms.pluck(:name), "stork"
refute_includes @repo_clone.errata.pluck(:pulp_id), "RHEA-2012:0056"
end
Expand Down Expand Up @@ -103,7 +102,9 @@ def test_yum_copy_all_no_filter_rules_without_dependency_solving
@repo_clone.reload

refute_empty @repo.rpms
assert_equal ["trout-0.12-1.noarch.rpm"], @repo_clone.rpms.pluck(:filename)
assert_equal ["trout-0.12-1.noarch.rpm", "frog-0.1-1.noarch.rpm", "duck-0.8-1.noarch.rpm",
"walrus-5.21-1.noarch.rpm", "walrus-0.71-1.noarch.rpm", "kangaroo-0.3-1.noarch.rpm",
"kangaroo-0.2-1.noarch.rpm", "duck-0.7-1.noarch.rpm", "duck-0.6-1.noarch.rpm"], @repo_clone.rpms.pluck(:filename)
end

def test_yum_copy_nonmatching_package_includion_filter_copies_no_content
Expand Down Expand Up @@ -139,7 +140,7 @@ def test_yum_copy_nonmatching_package_exclusion_filter_copies_everything
@repo_clone.reload

refute_empty @repo.rpms
assert_equal 32, @repo_clone.rpms.pluck(:name).sort.count
assert_equal 35, @repo_clone.rpms.pluck(:name).sort.count
end

def test_yum_copy_all_no_filter_rules_with_dependency_solving
Expand All @@ -158,9 +159,10 @@ def test_yum_copy_all_no_filter_rules_with_dependency_solving
@repo_clone.reload

refute_empty @repo.rpms
assert_equal ["bear", "cat", "crow", "dolphin", "elephant", "gorilla", "horse",
"kangaroo", "lion", "mouse", "penguin", "pike", "tiger", "trout",
"wolf", "zebra"], @repo_clone.rpms.pluck(:name).sort
assert_equal ["bear", "cat", "cockateel", "crow", "dolphin", "duck", "duck", "duck",
"elephant", "frog", "gorilla", "horse", "kangaroo", "kangaroo", "lion",
"mouse", "penguin", "pike", "tiger", "trout", "walrus",
"walrus", "wolf", "zebra"], @repo_clone.rpms.pluck(:name).sort
end

def test_yum_copy_with_whitelist_name_filter
Expand All @@ -177,7 +179,7 @@ def test_yum_copy_with_whitelist_name_filter
@repo_clone.reload

refute_empty @repo.rpms
assert_equal ['kangaroo'], @repo_clone.rpms.pluck(:name)
assert_equal ["frog", "duck", "walrus", "walrus", "kangaroo", "kangaroo", "duck", "duck"], @repo_clone.rpms.pluck(:name)
end

def test_yum_copy_with_whitelist_min_version_filter
Expand All @@ -194,7 +196,9 @@ def test_yum_copy_with_whitelist_min_version_filter
@repo_clone.reload

refute_empty @repo.rpms
assert_equal ['walrus-5.21-1.noarch.rpm'], @repo_clone.rpms.pluck(:filename)
assert_equal ["frog-0.1-1.noarch.rpm", "duck-0.8-1.noarch.rpm", "walrus-5.21-1.noarch.rpm",
"walrus-0.71-1.noarch.rpm", "kangaroo-0.3-1.noarch.rpm", "kangaroo-0.2-1.noarch.rpm",
"duck-0.7-1.noarch.rpm", "duck-0.6-1.noarch.rpm"], @repo_clone.rpms.pluck(:filename)
end

def test_yum_copy_with_whitelist_max_version_filter
Expand All @@ -211,13 +215,15 @@ def test_yum_copy_with_whitelist_max_version_filter
@repo_clone.reload

refute_empty @repo.rpms
assert_equal ['walrus-0.71-1.noarch.rpm'], @repo_clone.rpms.pluck(:filename)
assert_equal ["frog-0.1-1.noarch.rpm", "duck-0.8-1.noarch.rpm", "walrus-5.21-1.noarch.rpm", "walrus-0.71-1.noarch.rpm",
"kangaroo-0.3-1.noarch.rpm", "kangaroo-0.2-1.noarch.rpm", "duck-0.7-1.noarch.rpm",
"duck-0.6-1.noarch.rpm"], @repo_clone.rpms.pluck(:filename)
end

def test_yum_copy_with_duplicate_content
filter = FactoryBot.build(:katello_content_view_package_filter, :inclusion => true)

assert_equal 32, @repo.rpms.count
assert_equal 35, @repo.rpms.count
assert_includes @repo.rpms.pluck(:filename), 'walrus-0.71-1.noarch.rpm'

@repo_clone_original_version_href = @repo_clone.version_href
Expand Down Expand Up @@ -274,7 +280,9 @@ def test_yum_copy_with_all_duplicate_content_with_dep_solving
ForemanTasks.sync_task(::Actions::Katello::Repository::IndexContent, index_args)
@repo_clone.reload

assert_equal ["whale-0.2-1.noarch.rpm", "walrus-0.71-1.noarch.rpm", "stork-0.12-2.noarch.rpm", "shark-0.1-1.noarch.rpm"].sort,
assert_equal ["cockateel-3.1-1.noarch.rpm", "duck-0.6-1.noarch.rpm", "duck-0.7-1.noarch.rpm", "duck-0.8-1.noarch.rpm",
"frog-0.1-1.noarch.rpm", "kangaroo-0.2-1.noarch.rpm", "kangaroo-0.3-1.noarch.rpm", "lion-0.4-1.noarch.rpm",
"walrus-0.71-1.noarch.rpm", "walrus-5.21-1.noarch.rpm", "wolf-9.4-2.noarch.rpm"].sort,
@repo_clone.rpms.pluck(:filename).sort
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/actions/pulp3/orchestration/yum_sync_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def setup
User.current = users(:admin)
@primary = SmartProxy.pulp_primary
@repo = katello_repositories(:fedora_17_x86_64_duplicate)
@repo.root.update!(url: 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update!(url: 'https://fixtures.pulpproject.org/rpm-no-comps/')
create_repo(@repo, @primary)
ForemanTasks.sync_task(
::Actions::Katello::Repository::MetadataGenerate, @repo)
Expand Down
2 changes: 1 addition & 1 deletion test/actions/pulp3/repository/repair_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def setup
User.current = users(:admin)
@primary = SmartProxy.pulp_primary
@repo = katello_repositories(:fedora_17_x86_64_duplicate)
@repo.root.update!(url: 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update!(url: 'https://fixtures.pulpproject.org/rpm-no-comps/')
create_repo(@repo, @primary)
ForemanTasks.sync_task(
::Actions::Katello::Repository::MetadataGenerate, @repo)
Expand Down
2 changes: 1 addition & 1 deletion test/lib/tasks/pulpcore/repository_vcr_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setup

@primary = SmartProxy.pulp_primary
@library_repo = katello_repositories(:fedora_17_x86_64_duplicate)
@library_repo.root.update(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@library_repo.root.update(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')
@backend_service = ::Katello::Pulp3::Repository::Yum.new(@library_repo, @primary)

ENV['COMMIT'] = nil
Expand Down
2 changes: 1 addition & 1 deletion test/services/katello/pulp3/rpm_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RpmTest < ActiveSupport::TestCase
def setup
@primary = SmartProxy.pulp_primary
@repo = katello_repositories(:fedora_17_x86_64_duplicate)
@repo.root.update(:url => 'https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/')
@repo.root.update(:url => 'https://fixtures.pulpproject.org/rpm-no-comps/')
ensure_creatable(@repo, @primary)
create_repo(@repo, @primary)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"name": "Library"
},
"content_type": "yum",
"url": "https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/",
"url": "https://fixtures.pulpproject.org/rpm-no-comps/",
"arch": "noarch",
"content_id": "1597685535659",
"auto_enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"name": "Library"
},
"content_type": "yum",
"url": "https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/",
"url": "https://fixtures.pulpproject.org/rpm-no-comps/",
"arch": "noarch",
"os_versions": [],
"content_id": "1664981648561",
Expand Down
Loading