From c707a77b7dbad6ca903f73dda2c8f1ea593e56cd Mon Sep 17 00:00:00 2001 From: Ashique Saidalavi Date: Wed, 27 Nov 2024 16:36:35 +0530 Subject: [PATCH 1/2] Updated the error message and branding on start message Signed-off-by: Ashique Saidalavi --- lib/kitchen/command/action.rb | 4 ++-- lib/kitchen/command/test.rb | 4 ++-- lib/kitchen/licensing/base.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/kitchen/command/action.rb b/lib/kitchen/command/action.rb index fac6b7415..0cbfb05c8 100644 --- a/lib/kitchen/command/action.rb +++ b/lib/kitchen/command/action.rb @@ -29,12 +29,12 @@ class Action < Kitchen::Command::Base # Invoke the command. def call - banner "Starting Test Kitchen (v#{Kitchen::VERSION})" + banner "Starting Chef Test Kitchen Enterprise (v#{Kitchen::VERSION})" elapsed = Benchmark.measure do results = parse_subcommand(args.first) run_action(action, results) end - banner "Test Kitchen is finished. #{Util.duration(elapsed.real)}" + banner "Chef Test Kitchen Enterprise is finished. #{Util.duration(elapsed.real)}" end end end diff --git a/lib/kitchen/command/test.rb b/lib/kitchen/command/test.rb index 5a598537e..f366dd821 100644 --- a/lib/kitchen/command/test.rb +++ b/lib/kitchen/command/test.rb @@ -33,14 +33,14 @@ def call raise ArgumentError, "Destroy mode must be passing, always, or never." end - banner "Starting Test Kitchen (v#{Kitchen::VERSION})" + banner "Starting Chef Test Kitchen Enterprise (v#{Kitchen::VERSION})" elapsed = Benchmark.measure do destroy_mode = options[:destroy].to_sym results = parse_subcommand(args.join("|")) run_action(:test, results, destroy_mode) end - banner "Test Kitchen is finished. #{Util.duration(elapsed.real)}" + banner "Chef Test Kitchen Enterprise is finished. #{Util.duration(elapsed.real)}" end end end diff --git a/lib/kitchen/licensing/base.rb b/lib/kitchen/licensing/base.rb index 7ac3709dd..28163b577 100644 --- a/lib/kitchen/licensing/base.rb +++ b/lib/kitchen/licensing/base.rb @@ -33,7 +33,7 @@ class Base class << self def get_license_keys keys = ChefLicensing.license_keys - raise ChefLicensing::InvalidLicense, "A valid license is required to perform this action." if keys.blank? + raise ChefLicensing::InvalidLicense, "A valid license is required to perform this action. Run command to generate/activate the license." if keys.blank? client = get_license_client(keys) From 02e30f6f885b1d1a0b4341990755e1805eea116f Mon Sep 17 00:00:00 2001 From: Ashique Saidalavi Date: Thu, 28 Nov 2024 00:09:58 +0530 Subject: [PATCH 2/2] Updated the tests Signed-off-by: Ashique Saidalavi --- features/kitchen_test_command.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/kitchen_test_command.feature b/features/kitchen_test_command.feature index 1c4eef851..a9a171445 100644 --- a/features/kitchen_test_command.feature +++ b/features/kitchen_test_command.feature @@ -25,11 +25,11 @@ Feature: Running a full test instance test @spawn Scenario: Running a single instance When I run `kitchen test client-beans` - Then the output should contain "Starting Test Kitchen" + Then the output should contain "Starting Chef Test Kitchen Enterprise" Then the output should contain "Cleaning up any prior instances of " Then the output should contain "Testing " Then the output should contain "Finished testing " - Then the output should contain "Test Kitchen is finished." + Then the output should contain "Chef Test Kitchen Enterprise is finished." And the exit status should be 0 @spawn @@ -74,12 +74,12 @@ Feature: Running a full test instance test @spawn Scenario: Running all instances When I run `kitchen test` - Then the output should contain "Starting Test Kitchen" + Then the output should contain "Starting Chef Test Kitchen Enterprise" Then the output should contain "Finished testing " Then the output should contain "Finished testing " Then the output should contain "Finished testing " Then the output should contain "Finished testing " - Then the output should contain "Test Kitchen is finished." + Then the output should contain "Chef Test Kitchen Enterprise is finished." And the exit status should be 0 When I successfully run `kitchen list` Then the output should match /^client-cool\s+.+\s+\\s+\$/