Skip to content

Commit 987de8d

Browse files
committed
trying to add ruby 3.4 pipeline in chef-cli
Signed-off-by: nikhil2611 <[email protected]>
1 parent 4dedc9f commit 987de8d

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

.expeditor/verify.pipeline.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ steps:
2727
docker:
2828
image: ruby:3.3
2929

30+
- label: run-specs-ruby-3.4
31+
command:
32+
- .expeditor/run_linux_tests.sh rspec
33+
expeditor:
34+
executor:
35+
docker:
36+
image: ruby:3.4
37+
3038
- label: run-specs-windows-3.1
3139
command:
3240
- powershell .expeditor/run_windows_tests.ps1 rspec
@@ -46,6 +54,16 @@ steps:
4654
shell: ["powershell", "-Command"]
4755
image: rubydistros/windows-2019:3.3
4856

57+
- label: run-specs-windows-ruby-3.4
58+
command:
59+
- powershell .expeditor/run_windows_tests.ps1 rspec
60+
expeditor:
61+
executor:
62+
docker:
63+
host_os: windows
64+
shell: ["powershell", "-Command"]
65+
image: rubydistros/windows-2019:3.4
66+
4967
- label: cookstyle-generator-cb-tests-ruby-3.1
5068
command:
5169
- .expeditor/run_linux_tests.sh "rake style:cookstyle"
@@ -54,10 +72,26 @@ steps:
5472
docker:
5573
image: ruby:3.1
5674

75+
- label: cookstyle-generator-cb-tests-ruby-3.4
76+
command:
77+
- .expeditor/run_linux_tests.sh "rake style:cookstyle"
78+
expeditor:
79+
executor:
80+
docker:
81+
image: ruby:3.4
82+
5783
- label: chefstyle-tests-ruby-3.1
5884
command:
5985
- .expeditor/run_linux_tests.sh "rake style:chefstyle"
6086
expeditor:
6187
executor:
6288
docker:
6389
image: ruby:3.1
90+
91+
- label: chefstyle-tests-ruby-3.4
92+
command:
93+
- .expeditor/run_linux_tests.sh "rake style:chefstyle"
94+
expeditor:
95+
executor:
96+
docker:
97+
image: ruby:3.4

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ gemspec
44

55
gem "logger", "< 1.6" # 1.6 causes errors with mixlib-log < 3.1.1
66
gem "chefspec"
7+
gem "syslog"
8+
79
group :test do
810
gem "rake"
911
gem "rspec", "=3.12.0"

spec/unit/policyfile/cookbook_location_specification_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
expect(cookbook_location_spec).to_not be_valid
183183
expect(cookbook_location_spec.errors.size).to eq(1)
184184
error = cookbook_location_spec.errors.first
185-
expect(error).to eq("Cookbook `my_cookbook' has invalid source options `{:herp=>\"derp\"}'")
185+
expect(error).to eq("Cookbook `my_cookbook' has invalid source options `{herp: \"derp\"}'")
186186
end
187187

188188
end

spec/unit/policyfile_demands_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301
it "emits an error" do
302302
message = <<~MESSAGE
303303
The installed cookbooks do not contain all the recipes required by your run list(s):
304-
Cookbook 'remote-cb' = 1.1.1 {:artifactserver=>"https://supermarket.example/c/remote-cb/1.1.1/download", :version=>"1.1.1"}
304+
Cookbook 'remote-cb' = 1.1.1 {artifactserver: "https://supermarket.example/c/remote-cb/1.1.1/download", version: "1.1.1"}
305305
is missing the following required recipes:
306306
* this_recipe_doesnt_exist
307307
@@ -332,7 +332,7 @@
332332
it "emits an error" do
333333
message = <<~MESSAGE
334334
The installed cookbooks do not contain all the recipes required by your run list(s):
335-
Cookbook 'remote-cb' = 1.1.1 {:artifactserver=>"https://supermarket.example/c/remote-cb/1.1.1/download", :version=>"1.1.1"}
335+
Cookbook 'remote-cb' = 1.1.1 {artifactserver: "https://supermarket.example/c/remote-cb/1.1.1/download", version: "1.1.1"}
336336
is missing the following required recipes:
337337
* this_recipe_doesnt_exist
338338
@@ -364,7 +364,7 @@
364364
it "emits an error" do
365365
message = <<~MESSAGE
366366
The installed cookbooks do not contain all the recipes required by your run list(s):
367-
Cookbook 'remote-cb' = 1.1.1 {:artifactserver=>"https://supermarket.example/c/remote-cb/1.1.1/download", :version=>"1.1.1"}
367+
Cookbook 'remote-cb' = 1.1.1 {artifactserver: "https://supermarket.example/c/remote-cb/1.1.1/download", version: "1.1.1"}
368368
is missing the following required recipes:
369369
* this_recipe_doesnt_exist
370370
* this_also_doesnt_exist

spec/unit/policyfile_evaluation_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
1: raise 'oops'
7373
7474
Backtrace:
75-
TestPolicyfile.rb:1:in `eval_policyfile'
75+
TestPolicyfile.rb:1:in 'ChefCLI::Policyfile::DSL#eval_policyfile'
7676
E
7777
expect(policyfile.errors.first).to eq(expected_message)
7878
end
@@ -213,7 +213,7 @@
213213

214214
it "has an invalid source error" do
215215
expect(policyfile.errors.size).to eq(1)
216-
message = "Cookbook `foo' has invalid source options `{:herp=>\"derp\"}'"
216+
message = "Cookbook `foo' has invalid source options `{herp: \"derp\"}'"
217217
expect(policyfile.errors.first).to eq(message)
218218
end
219219
end
@@ -546,8 +546,8 @@
546546
expected = <<~EOH
547547
Cookbook 'foo' assigned to conflicting sources
548548
549-
Previous source: {:path=>"local_cookbooks/foo"}
550-
Conflicts with: {:chef_server=>"https://mychefserver.example.com"}
549+
Previous source: {path: "local_cookbooks/foo"}
550+
Conflicts with: {chef_server: "https://mychefserver.example.com"}
551551
EOH
552552
expect(policyfile.errors.size).to eq(1)
553553
expect(policyfile.errors.first).to eq(expected)
@@ -586,7 +586,7 @@
586586
2: metadata
587587
588588
Backtrace:
589-
TestPolicyfile.rb:2:in `eval_policyfile'
589+
TestPolicyfile.rb:2:in 'ChefCLI::Policyfile::DSL#eval_policyfile'
590590
EOH
591591
expect(File).to receive(:exist?).with("./metadata.rb").and_return(false)
592592
expect(File).to receive(:exist?).with("./metadata.json").and_return(false)
@@ -612,7 +612,7 @@
612612
2: metadata
613613
614614
Backtrace:
615-
TestPolicyfile.rb:2:in `eval_policyfile'
615+
TestPolicyfile.rb:2:in 'ChefCLI::Policyfile::DSL#eval_policyfile'
616616
EOH
617617
expect(File).to receive(:exist?).with("./metadata.rb").and_return(true)
618618
expect(File).to receive(:exist?).with("./metadata.json").and_return(true)

0 commit comments

Comments
 (0)