[root@localhost ~]# puppet module generate test-test
|
We need to create a metadata.json file for this module. Please answer the
|
following questions; if the question is not applicable to this module, feel free
|
to leave it blank.
|
|
Puppet uses Semantic Versioning (semver.org) to version modules.
|
What version is this module? [0.1.0]
|
-->
|
|
Who wrote this module? [test]
|
-->
|
|
What license does this module code fall under? [Apache 2.0]
|
-->
|
|
How would you describe this module in a single sentence?
|
-->
|
|
Where is this module's source code repository?
|
-->
|
|
Where can others go to learn more about this module?
|
-->
|
|
Where can others go to file issues about this module?
|
-->
|
|
----------------------------------------
|
{
|
"name": "test-test",
|
"version": "0.1.0",
|
"author": "test",
|
"summary": null,
|
"license": "Apache 2.0",
|
"source": "",
|
"project_page": null,
|
"issues_url": null,
|
"dependencies": [
|
{"name":"puppetlabs-stdlib","version_requirement":">= 1.0.0"}
|
]
|
}
|
----------------------------------------
|
|
About to generate this metadata; continue? [n/Y]
|
--> y
|
|
Notice: Generating module at /root/test-test...
|
Notice: Populating templates...
|
Finished; module generated in test-test.
|
test-test/tests
|
test-test/tests/init.pp
|
test-test/Rakefile
|
test-test/spec
|
test-test/spec/classes
|
test-test/spec/classes/init_spec.rb
|
test-test/spec/spec_helper.rb
|
test-test/Gemfile
|
test-test/manifests
|
test-test/manifests/init.pp
|
test-test/metadata.json
|
test-test/README.md
|
[root@localhost ~]# cd test-test/
|
[root@localhost test-test]# bundle install
|
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
|
installing your bundle as root will break this application for all non-root
|
users on this machine.
|
Fetching gem metadata from https://rubygems.org/..........
|
Fetching version metadata from https://rubygems.org/..
|
Resolving dependencies...
|
Using rake 10.4.2
|
Using CFPropertyList 2.2.8
|
Using diff-lcs 1.2.5
|
Using facter 2.4.0
|
Using json_pure 1.8.2
|
Using hiera 1.3.4
|
Using metaclass 0.0.4
|
Using mocha 1.1.0
|
Using puppet 3.7.4
|
Using puppet-lint 1.1.0
|
Using puppet-syntax 1.4.1
|
Using rspec-core 2.99.2
|
Using rspec-expectations 2.99.2
|
Using rspec-mocks 2.99.3
|
Using rspec 2.99.0
|
Using rspec-puppet 2.0.0
|
Using puppetlabs_spec_helper 0.8.2
|
Using bundler 1.7.13
|
Your bundle is complete!
|
Use `bundle show [gemname]` to see where a bundled gem is installed.
|
[root@localhost test-test]# bundle exec rake spec
|
/usr/bin/ruby -S rspec spec/classes/init_spec.rb --color
|
F
|
|
Failures:
|
|
1) test with defaults for all parameters should contain Class[test]
|
Failure/Error: it { should contain_class('test') }
|
Puppet::Error:
|
Could not find class test for localhost.lan.asio on node localhost.lan.asio
|
# /usr/share/ruby/benchmark.rb:296:in `realtime'
|
# ./spec/classes/init_spec.rb:5:in `block (3 levels) in <top (required)>'
|
|
Finished in 0.04774 seconds
|
1 example, 1 failure
|
|
Failed examples:
|
|
rspec ./spec/classes/init_spec.rb:5 # test with defaults for all parameters should contain Class[test]
|
/usr/bin/ruby -S rspec spec/classes/init_spec.rb --color failed
|