This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
forked from cristifalcas/puppet-journald
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to get the systemd journal to pass to rsyslog, it needs to be configured to pass to syslog. Default is to not. - SIMPed module - Wrote more spec tests - Added a few config options to the defaults - Added details to metadata.json - Added CentOS as a supported OS - Fixed lint errors SIMP-1839 #comment added journald module Change-Id: I30ab02a6f6f7d9a359186bee74bb1dc17c082905
- Loading branch information
Nick Miller
authored and
nmarkowski
committed
Nov 4, 2016
1 parent
5d71edc
commit 26e4c30
Showing
22 changed files
with
612 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
fixtures: | ||
repositories: | ||
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" | ||
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git" | ||
symlinks: | ||
journald: "#{source_dir}" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
*.log | ||
*~ | ||
.DS_Store | ||
spec/fixtures/* | ||
*.tmp | ||
.librarian | ||
pkg/* | ||
|
||
.*.sw? | ||
.yardoc | ||
dist | ||
/pkg | ||
/spec/fixtures | ||
/spec/rp_env | ||
!/spec/hieradata/default.yaml | ||
!/spec/fixtures/site.pp | ||
/.rspec_system | ||
/.vagrant | ||
/.bundle | ||
/Gemfile.lock | ||
/vendor | ||
/junit | ||
/log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--log-format="%{path}:%{line}:%{check}:%{KIND}:%{message}" | ||
--relative | ||
--no-class_inherits_from_params_class-check | ||
--no-80chars-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--format documentation | ||
--color | ||
--fail-fast |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
# PE/SIMP versions | ||
# app pup ruby | ||
# 2015.2 4.3 2.1.7 | ||
# 2015.3 4.3 2.1.8 | ||
# 2016.1 4.4 2.1.9 | ||
# 2016.2 4.5 2.1.9 | ||
# S6.0.0 4.7 2.1.9 | ||
--- | ||
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'" | ||
language: ruby | ||
sudo: true | ||
cache: bundler | ||
before_script: | ||
- bundle | ||
bundler_args: --without development system_tests | ||
before_install: rm Gemfile.lock || true | ||
script: | ||
- bundle exec rake test | ||
notifications: | ||
email: false | ||
rvm: | ||
- 1.8.7 | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.1.9 | ||
env: | ||
- PUPPET_VERSION=3.8 | ||
sudo: false | ||
global: | ||
- STRICT_VARIABLES=yes | ||
- TRUSTED_NODE_DATA=yes | ||
matrix: | ||
- PUPPET_VERSION="~> 4.7.0" | ||
- PUPPET_VERSION="~> 4.5.0" | ||
- PUPPET_VERSION="~> 3.8.0" | ||
- PUPPET_VERSION="~> 4.4.0" | ||
- PUPPET_VERSION="~> 4.3.0" | ||
- PUPPET_VERSION="~> 3.8.0" FUTURE_PARSER=yes | ||
matrix: | ||
fast_finish: true | ||
allow_failures: | ||
- env: PUPPET_VERSION="~> 4.5.0" | ||
- env: PUPPET_VERSION="~> 3.8.0" | ||
- env: PUPPET_VERSION="~> 4.4.0" | ||
- env: PUPPET_VERSION="~> 4.3.0" | ||
- env: PUPPET_VERSION="~> 3.8.0" FUTURE_PARSER=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* Thu Nov 03 2016 Nick Miller <[email protected]> - 0.2.2-0 | ||
- SIMPed module | ||
- Wrote more spec tests | ||
- Added a few config options to the defaults | ||
- Added details to metadata.json | ||
- Added CentOS as a supported OS | ||
- Fixed lint errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
This module has grown over time based on a range of contributions from | ||
people using it. If you follow these contributing guidelines your patch | ||
will likely make it into a release a little quicker. | ||
|
||
|
||
## Contributing | ||
|
||
1. Fork the repo. | ||
|
||
2. Run the tests. We only take pull requests with passing tests, and | ||
it's great to know that you have a clean slate. | ||
|
||
3. Add a test for your change. Only refactoring and documentation | ||
changes require no new tests. If you are adding functionality | ||
or fixing a bug, please add a test. | ||
|
||
4. Make the test pass. | ||
|
||
5. Push to your fork and submit a pull request. | ||
|
||
|
||
## Dependencies | ||
|
||
The testing and development tools have a bunch of dependencies, | ||
all managed by [Bundler](http://bundler.io/) according to the | ||
[Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions). | ||
|
||
By default the tests use a baseline version of Puppet. | ||
|
||
If you have Ruby 2.x or want a specific version of Puppet, | ||
you must set an environment variable such as: | ||
|
||
export PUPPET_VERSION="~> 3.2.0" | ||
|
||
Install the dependencies like so... | ||
|
||
bundle install | ||
|
||
## Syntax and style | ||
|
||
The test suite will run [Puppet Lint](http://puppet-lint.com/) and | ||
[Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to | ||
check various syntax and style things. You can run these locally with: | ||
|
||
bundle exec rake lint | ||
bundle exec rake syntax | ||
|
||
## Running the unit tests | ||
|
||
The unit test suite covers most of the code, as mentioned above please | ||
add tests if you're adding new functionality. If you've not used | ||
[rspec-puppet](http://rspec-puppet.com/) before then feel free to ask | ||
about how best to test your new feature. Running the test suite is done | ||
with: | ||
|
||
bundle exec rake spec | ||
|
||
Note also you can run the syntax, style and unit tests in one go with: | ||
|
||
bundle exec rake test | ||
|
||
### Automatically run the tests | ||
|
||
During development of your puppet module you might want to run your unit | ||
tests a couple of times. You can use the following command to automate | ||
running the unit tests on every change made in the manifests folder. | ||
|
||
bundle exec guard | ||
|
||
## Integration tests | ||
|
||
The unit tests just check the code runs, not that it does exactly what | ||
we want on a real machine. For that we're using | ||
[Beaker](https://github.com/puppetlabs/beaker). | ||
|
||
Beaker fires up a new virtual machine (using Vagrant) and runs a series of | ||
simple tests against it after applying the module. You can run our | ||
Beaker tests with: | ||
|
||
bundle exec rake acceptance | ||
|
||
This will use the host described in `spec/acceptance/nodeset/default.yml` | ||
by default. To run against another host, set the `BEAKER_set` environment | ||
variable to the name of a host described by a `.yml` file in the | ||
`nodeset` directory. For example, to run against CentOS 6.4: | ||
|
||
BEAKER_set=centos-64-x64 bundle exec rake acceptance | ||
|
||
If you don't want to have to recreate the virtual machine every time you | ||
can use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will | ||
at least need `BEAKER_provision` set to yes (the default). The Vagrantfile | ||
for the created virtual machines will be in `.vagrant/beaker_vagrant_files`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
source ENV['GEM_SOURCE'] || "https://rubygems.org" | ||
# ------------------------------------------------------------------------------ | ||
# NOTE: SIMP Puppet rake tasks support ruby 2.0 and ruby 2.1 | ||
# ------------------------------------------------------------------------------ | ||
gem_sources = ENV.key?('SIMP_GEM_SERVERS') ? ENV['SIMP_GEM_SERVERS'].split(/[, ]+/) : ['https://rubygems.org'] | ||
|
||
gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : "~> 3.0" | ||
gem 'rake', '~> 10' | ||
gem 'rspec-puppet', '~> 2.0' | ||
gem 'puppetlabs_spec_helper', '>= 0.8.0' | ||
gem 'puppet-lint', '>= 1' | ||
gem 'puppet-lint-unquoted_string-check' | ||
gem 'puppet-lint-empty_string-check' | ||
gem 'puppet-lint-spaceship_operator_without_tag-check' | ||
gem 'puppet-lint-absolute_classname-check' | ||
gem 'puppet-lint-undef_in_function-check' | ||
gem 'puppet-lint-leading_zero-check' | ||
gem 'puppet-lint-trailing_comma-check' | ||
gem 'puppet-lint-file_ensure-check' | ||
gem 'puppet-lint-variable_contains_upcase' | ||
gem 'simplecov' | ||
gem 'rspec-puppet-facts' | ||
gem 'metadata-json-lint' | ||
gem 'rspec', '< 3.2.0', {"platforms"=>["ruby_18"]} | ||
gem 'json', '< 2.0', {"platforms"=>["ruby_18"]} | ||
gem 'json_pure', '< 2.0', {"platforms"=>["ruby_18"]} | ||
gem_sources.each { |gem_source| source gem_source } | ||
|
||
group :test do | ||
gem "rake" | ||
gem 'puppet', ENV.fetch('PUPPET_VERSION', '~>4') | ||
gem "rspec", '< 3.2.0' | ||
gem "rspec-puppet" | ||
gem "hiera-puppet-helper" | ||
gem "puppetlabs_spec_helper" | ||
gem "metadata-json-lint" | ||
gem "simp-rspec-puppet-facts", ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 1.3') | ||
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', '~> 3') | ||
end | ||
|
||
group :development do | ||
gem "travis" | ||
gem "travis-lint" | ||
gem "travish" | ||
gem "puppet-blacksmith" | ||
gem "guard-rake" | ||
gem 'pry' | ||
gem 'pry-doc' | ||
gem 'puppet-strings' | ||
|
||
# `listen` is a dependency of `guard` | ||
# from `listen` 3.1+, `ruby_dep` requires Ruby version >= 2.2.3, ~> 2.2 | ||
gem 'listen', '~> 3.0.6' | ||
end | ||
|
||
group :system_tests do | ||
gem 'beaker', :git => 'https://github.com/trevor-vaughan/beaker', :ref => 'BKR-931-2.51.0' | ||
gem 'beaker-rspec' | ||
gem 'simp-beaker-helpers', ENV.fetch('SIMP_BEAKER_HELPERS_VERSION', '~> 1.5') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
Copyright (C) 2014 R. Tyler Croy <[email protected]> | ||
pupmod-simp-nfs - A Puppet Module for managing NFS | ||
|
||
-- | ||
|
||
Per Section 105 of the Copyright Act of 1976, these works are not entitled to | ||
domestic copyright protection under US Federal law. | ||
|
||
The US Government retains the right to pursue copyright protections outside of | ||
the United States. | ||
|
||
The United States Government has unlimited rights in this software and all | ||
derivatives thereof, pursuant to the contracts under which it was developed and | ||
the License under which it falls. | ||
|
||
--- | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,3 @@ | ||
require 'bundler' | ||
Bundler.require(:rake) | ||
require 'rake/clean' | ||
|
||
CLEAN.include('spec/fixtures/', 'doc', 'pkg') | ||
CLOBBER.include('.tmp', '.librarian') | ||
|
||
require 'puppetlabs_spec_helper/rake_tasks' | ||
|
||
task :default => [:clean, :spec] | ||
|
||
PuppetLint.configuration.fail_on_warnings = true | ||
PuppetLint.configuration.send('relative') | ||
PuppetLint.configuration.send('disable_80chars') | ||
PuppetLint.configuration.send('disable_class_inherits_from_params_class') | ||
PuppetLint.configuration.send('disable_class_parameter_defaults') | ||
PuppetLint.configuration.send('disable_documentation') | ||
PuppetLint.configuration.send('disable_single_quote_string_with_variables') | ||
PuppetLint.configuration.send('disable_empty_string_assignment') | ||
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] | ||
|
||
require 'simp/rake/pupmod/helpers' | ||
|
||
Simp::Rake::Pupmod::Helpers.new(File.dirname(__FILE__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.