puppetlabs / r10k

Smarter Puppet deployment
Other
800 stars 353 forks source link

unit tests don't pass on Arch Linux #1095

Closed bastelfreak closed 3 years ago

bastelfreak commented 3 years ago

Describe the Bug

While during the packaging of r10k for Arch Linux I built the gem from source and run the tests with rsec. This results in two failures.

Expected Behavior

passing tests.

Steps to Reproduce

Build https://gist.github.com/bastelfreak/3ca73da6351fce0c77ec74575e8dd7dd + the missing packages from the AUR. Please hit me up here or on slack or IRC and I can provide detailed build instructions or a test environment for you.

Environment

Latest Arch Linux

Additional Context

log output

.......................................................................................................................................*.............................................................................................................................................................................................F...........................................................................................................................F....................................................................................................................................................................................................................................................................................................................................#<Thread:0x0000555a029f9870 /build/r10k/src/r10k-3.6.0/lib/r10k/util/subprocess/runner/pump.rb:30 run> terminated with exception (report_on_exception is true):
<internal:io>:63:in `read_nonblock': stream closed in another thread (IOError)
    from /build/r10k/src/r10k-3.6.0/lib/r10k/util/subprocess/runner/pump.rb:49:in `pump'
    from /build/r10k/src/r10k-3.6.0/lib/r10k/util/subprocess/runner/pump.rb:30:in `block in start'
......................

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) R10K::Action::Deploy::Environment initializing normalizes environment names in the arg vector
     # Not yet implemented
     # ./spec/unit/action/deploy/environment_spec.rb:30

Failures:

  1) R10K::Forge::ModuleRelease#verify verifies using the forge file_sha256, if no sha256 file exists
     Failure/Error: md5_of_tarball = Digest(:MD5).file(@tarball_cache_path).hexdigest

     TypeError:
       no implicit conversion of RSpec::Mocks::InstanceVerifyingDouble into String
     # ./lib/r10k/forge/module_release.rb:133:in `verify'
     # ./spec/unit/forge/module_release_spec.rb:82:in `block (3 levels) in <top (required)>'

  2) R10K::Module::Forge when a module is deprecated warns on sync if module is not already insync
     Failure/Error: @expected_version = @v3_module.current_release.version

     NoMethodError:
       undefined method `version' for nil:NilClass
     # ./lib/r10k/module/forge.rb:68:in `expected_version'
     # ./lib/r10k/module/forge.rb:152:in `install'
     # ./lib/r10k/module/forge.rb:48:in `sync'
     # ./spec/unit/module/forge_spec.rb:76:in `block (3 levels) in <top (required)>'

Finished in 5.19 seconds (files took 0.29892 seconds to load)
796 examples, 2 failures, 1 pending

Failed examples:

rspec ./spec/unit/forge/module_release_spec.rb:75 # R10K::Forge::ModuleRelease#verify verifies using the forge file_sha256, if no sha256 file exists
rspec ./spec/unit/module/forge_spec.rb:66 # R10K::Module::Forge when a module is deprecated warns on sync if module is not already insync

installed gems:

# gem list

*** LOCAL GEMS ***

benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
cgi (default: 0.1.0)
colored2 (3.1.2)
cri (2.15.10)
csv (default: 3.1.2)
date (default: 3.0.0)
dbm (default: 1.1.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
diff-lcs (1.4.4)
etc (default: 1.1.0)
faraday (1.0.1)
faraday_middleware (1.0.0)
fast_gettext (2.0.3)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
forwardable (default: 1.3.1)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.0)
gettext (3.3.6)
gettext-setup (0.34)
io-console (default: 0.5.6)
ipaddr (default: 1.2.2)
irb (1.2.7)
json (default: 2.3.0)
locale (2.1.3)
log4r (1.1.10)
logger (default: 1.4.2)
matrix (default: 0.2.0)
minitar (0.9)
multi_json (1.15.0)
multipart-post (2.1.1)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
observer (default: 0.1.0)
open3 (default: 0.1.0)
openssl (default: 2.1.2)
ostruct (default: 0.2.0)
prime (default: 0.1.1)
pstore (default: 0.1.0)
psych (default: 3.1.0)
puppet_forge (2.3.4)
racc (default: 1.4.16)
rdoc (6.2.0)
readline (default: 0.0.2)
readline-ext (default: 0.1.0)
reline (0.1.5)
rexml (default: 3.2.3)
rspec (3.8.0)
rspec-core (3.8.0)
rspec-expectations (3.8.1)
rspec-mocks (3.8.0)
rspec-support (3.8.0)
rss (default: 0.2.8)
rugged (1.0.1)
sdbm (default: 1.0.0)
semantic_puppet (1.0.2)
singleton (default: 0.1.0)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
text (1.3.1)
timeout (default: 0.1.0)
tracer (default: 0.1.0)
uri (default: 0.10.0)
webrick (default: 1.6.0)
yaml (default: 0.1.0)
zlib (default: 1.1.0)
github-actions[bot] commented 3 years ago

This issue has been marked stale because it has had no activity for 60 days. The Puppet Team is actively prioritizing existing bugs and new features, if this issue is still important to you please comment and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.