The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #9472

Face actions should have the same license attribute as the Face they're associated with

Added by Jeff McCune about 3 years ago. Updated almost 3 years ago.

Status:AcceptedStart date:09/13/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Faces
Target version:3.x
Affected Puppet version:2.7.3 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

Overview

Writing tests for an action I’ve implemented I notice the copyright and license attributes of the action are set to default values rather than having the values of the Face they’re a part of.

Take for example this simple rspec test:

describe Puppet::Face[:node_aws, :current] do

  let(:action) { subject.get_action :list }

    context 'inline documentation' do
      it "should have a license (Puppet Enterprise)" do
        action.license.should =~ /Puppet Enterprise/
      end 
      it "should have a copyright" do
        action.copyright.should =~ /Puppet Labs/
      end 
      it "should have a description" do
        action.description.should =~ /aws/i
      end 
      it "should have a summary" do
        action.summary.should =~ /aws/i
      end 
      it "should have examples" do
        action.examples.should_not be_nil
      end
    end
end

This test of the action itself yields these failures:


Failures:

  1) Puppet::Face[:node_aws, v0.0.1] list action inline documentation should have a license (Puppet Enterprise)
     Failure/Error: action.license.should =~ /Puppet Enterprise/
       expected: /Puppet Enterprise/
            got: "All Rights Reserved" (using =~)
       Diff:
       @@ -1,2 +1,2 @@
       -/Puppet Enterprise/
       +All Rights Reserved
     # ./spec/unit/face/node_aws/list_spec.rb:46

  2) Puppet::Face[:node_vmware, v0.0.1] list action inline documentation should have a copyright
     Failure/Error: action.copyright.should =~ /Puppet Labs/
       expected: /Puppet Labs/
            got: "Unknown copyright owner and years." (using =~)
       Diff:
       @@ -1,2 +1,2 @@
       -/Puppet Labs/
       +Unknown copyright owner and years.
     # ./spec/unit/face/node_aws/list_spec.rb:49

In addition, I cannot set the license and copyright of the action itself. I think we should either allow each action to have a license and copyright attribute, or have the action return the value of the Face’s license and copyright attributes.

History

#1 Updated by James Turnbull about 3 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Nigel Kersten

#2 Updated by Nigel Kersten almost 3 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee deleted (Nigel Kersten)
  • Target version set to 3.x

Also available in: Atom PDF