summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-05-27 20:17:49 -0700
committerGitHub <noreply@github.com>2019-05-27 20:17:49 -0700
commitde9484f2804884582bb947524f7a9fd6656af7b2 (patch)
tree26311b75d1985c0ad93eb61103d0c679ed8e4634 /spec/functional
parent819307636de80266c6eb7e2072839e47f2dd4dbe (diff)
parentaa28c4e17ef1044fda844f4e9fb19f0d8e2469a2 (diff)
downloadchef-de9484f2804884582bb947524f7a9fd6656af7b2.tar.gz
Merge pull request #8460 from cc-build/dist_solo_zero
Add distro constants for solo, zero and automate
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/event_loggers/windows_eventlog_spec.rb10
-rw-r--r--spec/functional/version_spec.rb3
2 files changed, 7 insertions, 6 deletions
diff --git a/spec/functional/event_loggers/windows_eventlog_spec.rb b/spec/functional/event_loggers/windows_eventlog_spec.rb
index fa84e96c25..c1e5150428 100644
--- a/spec/functional/event_loggers/windows_eventlog_spec.rb
+++ b/spec/functional/event_loggers/windows_eventlog_spec.rb
@@ -49,7 +49,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
logger.run_start(version, run_status)
expect(event_log.read(flags, offset).any? do |e|
- e.source == "Chef" && e.event_id == 10000 &&
+ e.source == Chef::Dist::PRODUCT && e.event_id == 10000 &&
e.string_inserts[0].include?(version) end).to be_truthy
end
@@ -57,7 +57,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
logger.run_started(run_status)
expect(event_log.read(flags, offset).any? do |e|
- e.source == "Chef" && e.event_id == 10001 &&
+ e.source == Chef::Dist::PRODUCT && e.event_id == 10001 &&
e.string_inserts[0].include?(run_id) end).to be_truthy
end
@@ -66,7 +66,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
logger.run_completed(node)
expect(event_log.read(flags, offset).any? do |e|
- e.source == "Chef" && e.event_id == 10002 &&
+ e.source == Chef::Dist::PRODUCT && e.event_id == 10002 &&
e.string_inserts[0].include?(run_id) &&
e.string_inserts[1].include?(elapsed_time.to_s)
end).to be_truthy
@@ -77,7 +77,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
logger.run_failed(mock_exception)
expect(event_log.read(flags, offset).any? do |e|
- e.source == "Chef" && e.event_id == 10003 &&
+ e.source == Chef::Dist::PRODUCT && e.event_id == 10003 &&
e.string_inserts[0].include?(run_id) &&
e.string_inserts[1].include?(elapsed_time.to_s) &&
e.string_inserts[2].include?(mock_exception.class.name) &&
@@ -91,7 +91,7 @@ describe Chef::EventLoggers::WindowsEventLogger, :windows_only do
logger.run_failed(mock_exception)
expect(event_log.read(flags, offset).any? do |e|
- e.source == "Chef" && e.event_id == 10003 &&
+ e.source == Chef::Dist::PRODUCT && e.event_id == 10003 &&
e.string_inserts[0].include?("UNKNOWN") &&
e.string_inserts[1].include?("UNKNOWN") &&
e.string_inserts[2].include?(mock_exception.class.name) &&
diff --git a/spec/functional/version_spec.rb b/spec/functional/version_spec.rb
index b12d235405..246b3a021a 100644
--- a/spec/functional/version_spec.rb
+++ b/spec/functional/version_spec.rb
@@ -19,12 +19,13 @@ require File.expand_path("../../spec_helper", __FILE__)
require "chef/mixin/shell_out"
require "chef/version"
require "ohai/version"
+require "chef/dist"
describe "Chef Versions" do
include Chef::Mixin::ShellOut
let(:chef_dir) { File.join(File.dirname(__FILE__), "..", "..") }
- binaries = [ "chef-client", "chef-shell", "chef-apply", "knife", "chef-solo" ]
+ binaries = [ Chef::Dist::CLIENT, "chef-shell", "chef-apply", "knife", Chef::Dist::SOLOEXEC ]
binaries.each do |binary|
it "#{binary} version should be sane" do