Skip to content

Commit

Permalink
Promotion Search: Fixes for broken unit tests related to adding
Browse files Browse the repository at this point in the history
index_packages during promotion.
  • Loading branch information
ehelms committed Jan 30, 2012
1 parent be7d78e commit 42b7cda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/models/changeset.rb
Expand Up @@ -322,7 +322,9 @@ def promote_content
self.save!

self.repos.each do |repo|
repo.get_clone(to_env).index_packages
if repo.is_cloned_in? to_env
repo.get_clone(to_env).index_packages
end
end

rescue Exception => e
Expand Down
5 changes: 5 additions & 0 deletions src/spec/models/changeset_spec.rb
Expand Up @@ -290,11 +290,16 @@
@prod.stub(:repos).and_return([@repo])
@prod.stub_chain(:repos, :where).and_return([@repo])

@clone.stub(:index_packages).and_return()
@repo.stub(:index_packages).and_return()

@environment.prior.stub(:products).and_return([@prod])
@environment.prior.products.stub(:find_by_name).and_return(@prod)
@changeset.stub(:wait_for_tasks).and_return(nil)
@changeset.stub(:calc_dependencies).and_return([])

Glue::Pulp::Package.stub(:index_packages).and_return(true)

end

it "should fail if the product is not in the review phase" do
Expand Down

0 comments on commit 42b7cda

Please sign in to comment.