hiera-eyaml icon indicating copy to clipboard operation
hiera-eyaml copied to clipboard

Issue #179 Add tests for empty eyaml values

Open pillarsdotnet opened this issue 3 years ago • 4 comments

This PR only contains test changes for #179 and the tests should fail.

pillarsdotnet avatar Jul 29 '21 16:07 pillarsdotnet

Unfortunately, when I run cucumber as directed, I get the following error:

cannot load such file -- aruba/config (LoadError)

I made the following change:

diff --git a/features/support/env.rb b/features/support/env.rb
index 1b3bfc9..5bb9b85 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -2,7 +2,7 @@ rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
 rubylib.unshift %|#{File.dirname(__FILE__) + '/../../lib'}|
 ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
 require 'rubygems'
-require 'aruba/config'
+require 'aruba/configuration'
 require 'aruba/cucumber'
 require 'fileutils'
 require 'pathname'

Then I ran cucumber again and got a new error:

undefined method `before_cmd' for #<Aruba::Configuration:0x00007fffb9053a00>
Did you mean?  before (NoMethodError)
   /home/rvincentii001/github/hiera-eyaml/features/support/env.rb:29:in `block in <top (required)>'

I made an additional change:

diff --git a/features/support/env.rb b/features/support/env.rb
index 5bb9b85..226bc38 100644
--- a/features/support/env.rb
+++ b/features/support/env.rb
@@ -26,7 +26,7 @@ end
 # ENV['EDITOR']="/bin/cat"

 Aruba.configure do |config|
-  config.before_cmd do |cmd|
+  config.before(:cmd) do |cmd|
     SetupSandbox.create_files test_files
     # when executing, resolve the SANDBOX_HOME into a real HOME
     ENV['HOME'] = Pathname.new(ENV['SANDBOX_HOME']).realpath.to_s

And this time the tests did run, but I got lots of unexpected No such file or directory errors.

pillarsdotnet avatar Jul 29 '21 16:07 pillarsdotnet

Here's the Cucumber Report: https://reports.cucumber.io/reports/3bce10ce-e653-49cc-8610-b75976b94206

pillarsdotnet avatar Jul 29 '21 16:07 pillarsdotnet

I had to close and reopen the PR to trigger github actions

bastelfreak avatar Jul 30 '21 07:07 bastelfreak

Tests should have failed. They passed, so either the added tests are inadequate, or the reported bug does not actually exist.

pillarsdotnet avatar Aug 03 '21 16:08 pillarsdotnet