[katello-devel] No more commits to master!

Partha Aji paji at redhat.com
Wed May 25 17:26:40 UTC 2011


You can also 

cd $KATELLO_GIT/src
script/run_spec user*
to run spec/model/user_spec.rb (searches for user*_spec.rb)


Partha

----- Original Message -----
> From: "Shannon Hughes" <shughes at redhat.com>
> To: katello-devel at redhat.com
> Sent: Wednesday, May 25, 2011 10:01:19 AM
> Subject: Re: [katello-devel] No more commits to master!
> fwiw, here are a couple bash functions I find handy when testing
> individual rspecs,
> 
> # spec tests
> function rsc() { rake spec
> "SPEC=spec/controllers/${1}_controller_spec.rb";}
> function rsm() { rake spec "SPEC=spec/models/${1}_spec.rb"; }
> 
> stick them in your .bashrc
> 
> regards,
> 
> shannon
> 
> On 05/24/2011 09:02 PM, Mike McCune wrote:
> > I spent some time this afternoon looking at the failed unit tests in
> > master and fixed the one in OrganizationsController but there are
> > still 3 remaining that are broken:
> >
> > Failures:
> >
> >   1) ResourcePermissions ResourcePermissions for Candlepin should
> > create set of permissions for new owner and delete after destroy
> >      Failure/Error:
> > Candlepin::CandlepinResourcePermissions::after_post_callback('/candlepin/owners/',
> > nil, nil, to_response)
> >      ArgumentError:
> >        user has no own role
> >      # ./app/models/user.rb:100:in `allow'
> >      # ./lib/resources/candlepin.rb:55
> >      # ./lib/resource_permissions.rb:79:in `call'
> >      # ./lib/resource_permissions.rb:79:in `call_actions'
> >      # ./lib/resource_permissions.rb:72:in `each'
> >      # ./lib/resource_permissions.rb:72:in `call_actions'
> >      # ./lib/resource_permissions.rb:106:in `after_post_callback'
> >      # ./spec/models/resource_perm_spec.rb:38
> >
> >   2) Api::RepositoriesController create a repository should call
> >   pulp
> > and candlepin layer
> >      Failure/Error: post 'create', :name => 'repo_1', :url =>
> > 'http://www.repo.org', :product_id => 'product_1'
> >      ActionController::RoutingError:
> >        No route matches {:action=>"create",
> >        :product_id=>"product_1",
> > :name=>"repo_1", :url=>"http://www.repo.org",
> > :controller=>"api/repositories"}
> >      # ./spec/controllers/api/repositories_controller_spec.rb:17
> >
> >   3) EnvironmentsController GET edit assigns the requested
> >   environment
> > as @environment
> >      Failure/Error: get :edit, :id => @env.id, :organization_id =>
> > @org.cp_key
> >        Mock KPEnvironment(id: integer, name: string, description:
> > string, locker: boolean, organization_id: integer, changeset_id:
> > integer, changeset_history_id: integer, created_at: datetime,
> > updated_at: datetime) received unexpected message :path with (no
> > args)
> >      # ./app/controllers/environments_controller.rb:46:in `edit'
> >      # ./lib/util/threadsession.rb:79:in `thread_locals'
> >      # ./spec/controllers/environments_controller_spec.rb:70
> >
> >
> > I tried to fix (1) but wasn't quite sure what was going on there.
> > Can
> > we get some volunteers to fix the above issues before *anything*
> > else
> > goes into master?
> >
> > I propose a simple rule:
> >
> > *** No commits to master until unit tests are green ***
> >
> > Mike
> 
> _______________________________________________
> katello-devel mailing list
> katello-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/katello-devel




More information about the katello-devel mailing list