Skip to content

Commit

Permalink
Refs #37552 - add container push CV publish tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Jun 26, 2024
1 parent c301503 commit 2cd4d6d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/actions/katello/environment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,26 @@ class TestBase < ActiveSupport::TestCase
end
end

class PublishContainerRepositoriesTest < TestBase
let(:action_class) { ::Actions::Katello::Environment::PublishContainerRepositories }
let(:action) { create_action action_class }

let(:environment) { stub }

it 'does not plan for container push library repos' do
container_push_repo = ::Katello::RootRepository.find_by(name: 'busybox').library_instance
container_push_repo.root.update(is_container_push: true)
environment.stubs(:repositories).returns([container_push_repo])
container_push_repo.expects(:set_container_repository_name).never
container_push_repo.expects(:clear_smart_proxy_sync_histories).never
action.stubs(:action_subject).with(environment)

plan_action(action, environment)
refute_action_planned(action, ::Actions::Katello::Repository::InstanceUpdate)
refute_action_planned(action, ::Actions::Katello::Repository::CapsuleSync)
end
end

class DestroyTest < TestBase
let(:action_class) { ::Actions::Katello::Environment::Destroy }
let(:action) { create_action action_class }
Expand Down

0 comments on commit 2cd4d6d

Please sign in to comment.