Issue #9472 has been reported by Jeff McCune.
----------------------------------------
Feature #9472: Face actions should have the same license attribute as the Face
they're associated with
https://projects.puppetlabs.com/issues/9472
Author: Jeff McCune
Status: Unreviewed
Priority: Normal
Assignee:
Category: Faces
Target version:
Affected Puppet version: 2.7.3
Keywords:
Branch:
# 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:
<pre>
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
</pre>
This test of the action itself yields these failures:
<pre>
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
</pre>
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.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.