Include missing EC2 stub request#272
Conversation
|
Hi, can you explain a bit how you run the tests any maybe post |
|
Sure, I use rbenv to setup Ruby and Bundler. When the setup is done I execute the command I also wonder why problem doesn't occur in the GitHub CI and my hypothesis was exactly the one that you mentioned. I think this problem only occur locally. |
|
Output of EnvironmentBundler Build MetadataBundler settingsGemfileGemfilesource ENV['GEM_SOURCE'] || "https://rubygems.org"
gemspec
def location_for(place, fake_version = nil)
if place.is_a?(String) && place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
[fake_version, { git: $1, branch: $2, require: false }].compact
elsif place.is_a?(String) && place =~ /^file:\/\/(.*)/
['>= 0', { path: File.expand_path($1), require: false }]
else
[place, { require: false }]
end
end
# Make sure these gem requirements are in sync with the gemspec. Specifically,
# the runtime_dependencies in openvox.gemspec match the runtime dependencies here
# (like openfact, semantic_puppet, and puppet-resource_api)
gem "openfact", *location_for(ENV['OPENFACT_LOCATION'] || ["~> 5.0"])
gem "semantic_puppet", *location_for(ENV['SEMANTIC_PUPPET_LOCATION'] || ["~> 1.0"])
gem "puppet-resource_api", *location_for(ENV['RESOURCE_API_LOCATION'] || ["~> 2.0"])
# Need to update the openssl gem on MacOS to avoid SSL errors. Doesn't hurt to have the newest
# for all platforms.
# https://www.rubyonmac.dev/certificate-verify-failed-unable-to-get-certificate-crl-openssl-ssl-sslerror
gem 'openssl' unless `uname -o`.chomp == 'Cygwin'
group(:features) do
gem 'diff-lcs', '~> 1.3', require: false
gem "hiera", *location_for(ENV['HIERA_LOCATION']) if ENV.has_key?('HIERA_LOCATION')
gem 'hiera-eyaml', *location_for(ENV['HIERA_EYAML_LOCATION'])
gem 'hocon', '~> 1.0', require: false
# requires native libshadow headers/libs
#gem 'ruby-shadow', '~> 2.5', require: false, platforms: [:ruby]
gem 'minitar', '~> 1.0', require: false
gem 'msgpack', '~> 1.2', require: false
gem 'rdoc', ['~> 6.0', '< 6.4.0'], require: false, platforms: [:ruby]
# requires native augeas headers/libs
# gem 'ruby-augeas', require: false, platforms: [:ruby]
# requires native ldap headers/libs
# gem 'ruby-ldap', '~> 0.9', require: false, platforms: [:ruby]
gem 'openvoxserver-ca', '~> 3.0', require: false
gem 'syslog', '>= 0.1.1', '< 1', require: false, platforms: [:ruby]
gem 'CFPropertyList', ['>= 3.0.6', '< 4'], require: false
end
group(:test) do
# 1.16.0 - 1.16.2 are broken on Windows
gem 'ffi', '>= 1.15.5', '< 2', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2', require: false
gem "json-schema", '>= 2', '< 6', require: false
gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 13.0')
gem "rspec", "~> 3.1", require: false
gem "rspec-expectations", ["~> 3.9", "!= 3.9.3"]
gem "rspec-its", "~> 1.1", require: false
gem 'rspec-mocks', '< 3.13.3', require: false # breaking change afterwards: https://github.com/rspec/rspec-mocks/pull/1596
gem 'vcr', '~> 6.1', require: false
gem 'webmock', '~> 3.0', require: false
gem 'webrick', '~> 1.7', require: false
gem 'yard', require: false
gem 'rubocop', '~> 1.81.6', require: false, platforms: [:ruby]
gem 'rubocop-i18n', '~> 3.0', require: false, platforms: [:ruby]
gem 'rubocop-performance', '~> 1.0', require: false, platforms: [:ruby]
gem 'rubocop-rake', '~> 0.6', require: false, platforms: [:ruby]
gem 'rubocop-rspec', '~> 3.0', require: false, platforms: [:ruby]
end
group(:development, optional: true) do
gem 'memory_profiler', require: false, platforms: [:mri]
gem 'pry', require: false, platforms: [:ruby]
if RUBY_PLATFORM != 'java'
gem 'ruby-prof', '>= 0.16.0', require: false
end
end
group(:packaging) do
gem 'packaging', *location_for(ENV['PACKAGING_LOCATION'] || '~> 0.105')
if RUBY_VERSION >= '3.2'
gem 'vanagon', *location_for(ENV['VANAGON_LOCATION'] || 'https://github.com/openvoxproject/vanagon#main')
end
gem 'artifactory'
gem 'json'
gem 'octokit'
end
group(:documentation, optional: true) do
gem 'gettext-setup', '~> 1.0', require: false, platforms: [:ruby]
gem 'ronn-ng', '~> 0.10.1', require: false, platforms: [:ruby]
gem 'puppet-strings', require: false, platforms: [:ruby]
gem 'pandoc-ruby', require: false, platforms: [:ruby]
end
group :release, optional: true do
gem 'faraday-retry', require: false
gem 'github_changelog_generator', require: false, git: 'https://github.com/voxpupuli/github-changelog-generator', branch: 'avoid-processing-a-single-commit-multiple-time'
end
if File.exist? "#{__FILE__}.local"
eval(File.read("#{__FILE__}.local"), binding)
end
# vim:filetype=rubyGemfile.lockGemspecsopenvox.gemspec# When installed, this gemspec ends up the specifications dir and we should look for
# the library at the installed path because Puppet ends up loading it when invoked.
# When we are building the gem from source, we instead look relative to where this gemspec
# file lives. This is a little jank, but prevents us from having to update the version in
# two different places.
installed_path = "#{__dir__}/../../../vendor_ruby/puppet/version"
version_path = File.exist?("#{installed_path}.rb") ? installed_path : 'lib/puppet/version'
require_relative "#{version_path}"
Gem::Specification.new do |spec|
spec.name = "openvox"
spec.version = Puppet.version
spec.licenses = ['Apache-2.0']
spec.required_rubygems_version = Gem::Requirement.new("> 1.3.1")
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
spec.authors = ["OpenVox Project"]
spec.date = "2012-08-17"
spec.description = <<~EOF
OpenVox is a community implementation of Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs administrative tasks
(such as adding users, installing packages, and updating server configurations) based on a centralized specification.
EOF
spec.email = "[email protected]"
spec.executables = ["puppet"]
spec.files = Dir['[A-Z]*'] + Dir['install.rb'] + Dir['bin/*'] + Dir['lib/**/*'] + Dir['conf/*'] + Dir['man/**/*'] + Dir['tasks/*'] + Dir['locales/**/*'] + Dir['ext/**/*'] + Dir['examples/**/*']
spec.license = "Apache-2.0"
spec.homepage = "https://github.com/OpenVoxProject/openvox"
spec.rdoc_options = ["--title", "OpenVox - Configuration Management", "--main", "README", "--line-numbers"]
spec.require_paths = ["lib"]
spec.summary = "OpenVox, a community implementation of Puppet -- an automated configuration management tool"
spec.specification_version = 4
spec.add_runtime_dependency('base64', '>= 0.1', '< 0.4')
spec.add_runtime_dependency('benchmark', '>= 0.3', '< 0.6')
spec.add_runtime_dependency('concurrent-ruby', '~> 1.0')
spec.add_runtime_dependency('deep_merge', '~> 1.0')
spec.add_runtime_dependency('fast_gettext', '>= 2.1', '< 5')
spec.add_runtime_dependency('getoptlong', '~> 0.2.0')
spec.add_runtime_dependency('locale', '~> 2.1')
spec.add_runtime_dependency('multi_json', '~> 1.13')
spec.add_runtime_dependency('openfact', '~> 5.0')
spec.add_runtime_dependency('ostruct', '~> 0.6.0')
spec.add_runtime_dependency('puppet-resource_api', '~> 2.0')
spec.add_runtime_dependency('racc', '~> 1.5')
spec.add_runtime_dependency('scanf', '~> 1.0')
spec.add_runtime_dependency('semantic_puppet', '~> 1.0')
platform = spec.platform.to_s
if platform == 'universal-darwin'
spec.add_runtime_dependency('CFPropertyList', ['>= 3.0.6', '< 5'])
end
if platform == 'x64-mingw32' || platform == 'x86-mingw32'
# ffi 1.16.0 - 1.16.2 are broken on Windows
spec.add_runtime_dependency('ffi', '>= 1.15.5', '< 2', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2')
spec.add_runtime_dependency('minitar', '~> 1.0')
end
end |
|
@eciii this repos required signed commits. Can you please sign your commit with a gpg or ssh key? |
59de22e to
eb21678
Compare
|
@bastelfreak Took some time but I managed to do it... |
|
@eciii can you please rebase against our latest main branch? That should fix the CI. |
Several tests fail locally because Facter is leaking an EC2 request (see puppetlabs/facter#2690). This commit adds the leaked EC2 request as a stub request in the test suite.
Head branch was pushed to by a user without write access
eb21678 to
17e53f2
Compare
|
@bastelfreak sure, done |
I'm trying to run the full test suite locally (on Ubuntu LTS and on CentOS Stream 10) but I keep getting failures on several tests related to Facter. Here is a snippet of the output of one of such tests:
The reason, I believe, is a leaked EC2 request due to the following bug in Facter: puppetlabs/facter#2690. This PR adds the leaked EC2 request as a stub request in the test suite.