Skip to content

Commit

Permalink
Merge pull request #411 from chef/nikhil/CHEF-1916-verify-test-failure
Browse files Browse the repository at this point in the history
Fixing verify test failure
  • Loading branch information
nikhil2611 authored Oct 9, 2023
2 parents 77d4da1 + 5fcc492 commit 20e1e36
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .expeditor/run_windows_tests.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Stop script execution when a non-terminating error occurs
$ErrorActionPreference = "Stop"

# This will run ruby test on windows platform

Write-Output "--- Bundle install"
ruby --version
bundler --version
gem update --system
If ($lastexitcode -ne 0) { Exit $lastexitcode }

bundle config --local path vendor/bundle
If ($lastexitcode -ne 0) { Exit $lastexitcode }
Expand Down
15 changes: 8 additions & 7 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ expeditor:

steps:

- label: run-specs-ruby-2.6
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
image: ruby:2.6
- label: run-specs-ruby-2.7
command:
- .expeditor/run_linux_tests.sh rake
Expand Down Expand Up @@ -50,6 +43,10 @@ steps:
shell: ["powershell", "-Command"]
image: rubydistros/windows-2019:3.0
user: 'NT AUTHORITY\SYSTEM'
environment:
- FORCE_FFI_YAJL=ext
- EXPIRE_CACHE=true
- CHEF_LICENSE=accept-no-persist

- label: run-specs-ruby-3.1-windows
command:
Expand All @@ -61,3 +58,7 @@ steps:
shell: ["powershell", "-Command"]
image: rubydistros/windows-2019:3.1
user: 'NT AUTHORITY\SYSTEM'
environment:
- FORCE_FFI_YAJL=ext
- EXPIRE_CACHE=true
- CHEF_LICENSE=accept-no-persist
17 changes: 9 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,21 @@ gemspec
group :development do
gem "chefstyle"
gem "rake"
gem "contracts", "~> 0.16.1" # pin until we drop ruby < 2.7
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0")
gem "contracts", "~> 0.16.1" # pin until we drop ruby < 2.7
gem "chef-zero"
gem "rspec", "~> 3.4"
gem "aruba", "~> 0.6"
gem "chef", "~> 14.0"
gem "chef-utils", "17.10.0" # pin until we drop ruby 2.5
gem "rspec", "~> 3.0"
gem "aruba", "~> 2.2"
gem "chef", "~> 15.4"
gem "chef-utils", "17.10.68" # pin until we drop ruby 2.5
else
gem "contracts", "~> 0.17"
gem "chef-zero", ">= 15.0.4"
gem "chef", "~> 17.0"
gem "rspec", "~> 3.10.0"
gem "aruba", "~> 1.1"
gem "rspec", "~> 3.0"
gem "aruba", "~> 2.2"
gem "knife", "~> 17.0"
gem "chef-utils", "17.10.0" # pin until we drop ruby >=3
gem "chef-utils", "17.10.68" # pin until we drop ruby >=3
end
end

Expand Down
8 changes: 7 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "bundler/gem_tasks"

WINDOWS_PLATFORM = %w{ x64-mingw32 x64-mingw-ucrt ruby }.freeze

# Style Tests
begin
require "chefstyle"
Expand Down Expand Up @@ -36,7 +38,11 @@ end
begin
require "cucumber"
require "cucumber/rake/task"
Cucumber::Rake::Task.new(:features)
Cucumber::Rake::Task.new(:features) do |t|
if RUBY_PLATFORM =~ WINDOWS_PLATFORM || RUBY_PLATFORM =~ /darwin/
t.cucumber_opts = "--tags 'not @not-windows'"
end
end
rescue LoadError
puts "Cucumber/Aruba not available; disabling feature tasks"
# create a no-op spec task for :default
Expand Down
2 changes: 1 addition & 1 deletion chef-vault.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Gem::Specification.new do |s|
s.bindir = "bin"
s.executables = %w{ chef-vault }

s.required_ruby_version = ">= 2.6"
s.required_ruby_version = ">= 2.7"
end

0 comments on commit 20e1e36

Please sign in to comment.