Initial commit
This code came from http://git.openstack.org/cgit/openstack/puppet-openstack_spec_helper/ and was modified for infra's use. The gems specified in gemspec are current with what infra is currently using. Change-Id: I06e47d4af32f30e4504ee67257923a4596725d0f
This commit is contained in:
parent
263c91a159
commit
8fe0a33f15
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.gem
|
6
CHANGELOG.md
Normal file
6
CHANGELOG.md
Normal file
@ -0,0 +1,6 @@
|
||||
Mon Jun 20 2016
|
||||
|
||||
Copied from puppet-openstack_spec_helper
|
||||
|
||||
Release notes are published on
|
||||
[docs.openstack.org](http://docs.openstack.org/releasenotes/puppet-openstack_spec_helper/).
|
14
LICENSE
Normal file
14
LICENSE
Normal file
@ -0,0 +1,14 @@
|
||||
Copyright 2016 IBM
|
||||
Copyright 2012 OpenStack Foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
16
README.md
Normal file
16
README.md
Normal file
@ -0,0 +1,16 @@
|
||||
Puppet-OpenStack-Infra Spec Helper
|
||||
==================================
|
||||
|
||||
This gem provides transitive dependencies for the OpenStack Puppet Modules
|
||||
[OpenStack Infra Modules](http://docs.openstack.org/infra/system-config/sysadmin.html).
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Include this gem in your Gemfile:
|
||||
|
||||
```
|
||||
gem 'puppet-openstack_infra_spec_helper',
|
||||
:git => 'https://git.openstack.org/openstack-infra/puppet-openstack_infra_spec_helper',
|
||||
:require => false
|
||||
```
|
5
lib/puppet-openstack_infra_spec_helper/version.rb
Normal file
5
lib/puppet-openstack_infra_spec_helper/version.rb
Normal file
@ -0,0 +1,5 @@
|
||||
module PuppetOpenstackInfraSpecHelper
|
||||
module Version
|
||||
STRING = '0.0.1'
|
||||
end
|
||||
end
|
42
puppet-openstack_infra_spec_helper.gemspec
Normal file
42
puppet-openstack_infra_spec_helper.gemspec
Normal file
@ -0,0 +1,42 @@
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'puppet-openstack_infra_spec_helper/version'
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "puppet-openstack_infra_spec_helper"
|
||||
spec.version = PuppetOpenstackInfraSpecHelper::Version::STRING
|
||||
spec.authors = ["OpenStack Infrastructure Team"]
|
||||
spec.description = %q{Helpers for module testing}
|
||||
spec.summary = %q{Puppet-OpenStack-Infra spec helper}
|
||||
spec.homepage = ""
|
||||
spec.license = "Apache-2.0"
|
||||
|
||||
spec.files = `git ls-files`.split($/)
|
||||
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
||||
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
||||
spec.require_paths = ["lib"]
|
||||
|
||||
# dependencies that are needed to run puppet-lint
|
||||
spec.add_dependency 'puppetlabs_spec_helper'
|
||||
spec.add_dependency 'metadata-json-lint'
|
||||
spec.add_dependency 'puppet-lint-absolute_classname-check'
|
||||
spec.add_dependency 'puppet-lint-absolute_template_path'
|
||||
spec.add_dependency 'puppet-lint-trailing_newline-check'
|
||||
|
||||
spec.add_dependency 'puppet-lint-unquoted_string-check'
|
||||
spec.add_dependency 'puppet-lint-leading_zero-check'
|
||||
spec.add_dependency 'puppet-lint-variable_contains_upcase'
|
||||
spec.add_dependency 'puppet-lint-spaceship_operator_without_tag-check'
|
||||
spec.add_dependency 'puppet-lint-undef_in_function-check'
|
||||
spec.add_dependency 'json'
|
||||
spec.add_dependency 'netaddr'
|
||||
spec.add_dependency 'webmock'
|
||||
# google-api-client requires Ruby version ~> 2.0
|
||||
spec.add_dependency 'google-api-client', ['0.9.4']
|
||||
# latest specinfra broke us, we pin it until we figure what's wrong.
|
||||
spec.add_dependency 'specinfra', ['2.59.0']
|
||||
|
||||
# dependencies that are needed to run beaker-rspec
|
||||
spec.add_dependency 'beaker-rspec'
|
||||
spec.add_dependency 'beaker-puppet_install_helper'
|
||||
end
|
40
run_unit_tests.sh
Executable file
40
run_unit_tests.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash -ex
|
||||
# Copyright 2015 Red Hat, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
|
||||
|
||||
mkdir .bundled_gems
|
||||
export GEM_HOME=`pwd`/.bundled_gems
|
||||
|
||||
# Prove that gem build works
|
||||
gem build puppet-openstack_infra_spec_helper.gemspec
|
||||
|
||||
# use puppet-openstackci to test the gem
|
||||
if [ -e /usr/zuul-env/bin/zuul-cloner ] ; then
|
||||
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
|
||||
git://git.openstack.org openstack-infra/puppet-openstackci
|
||||
else
|
||||
git clone git://git.openstack.org/openstack-infra/puppet-openstackci openstack-infra/puppet-openstackci
|
||||
fi
|
||||
cd openstack-infra/puppet-openstackci
|
||||
|
||||
# Modify Gemfile to use local library and not the one on git
|
||||
# so we can actually test the current state of the gem.
|
||||
sed -i "s/.*git => 'https:\/\/git.openstack.org\/openstack-infra\/puppet-openstack_infra_spec_helper.*/ :path => '..\/..',/" Gemfile
|
||||
|
||||
# Install dependencies
|
||||
gem install bundler --no-rdoc --no-ri --verbose
|
||||
|
||||
$GEM_HOME/bin/bundle install
|
Loading…
x
Reference in New Issue
Block a user