diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b351d492..41f5d32ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,23 @@ # Test Kitchen Change Log + ## [v1.0.0](https://github.com/chef/chef-test-kitchen-enterprise/tree/v1.0.0) (2024-11-11) -#### Merged Pull Requests +### Merged Pull Requests + - Rebranding Change and the new version and change.log file [#11](https://github.com/chef/chef-test-kitchen-enterprise/pull/11) ([sanghinitin](https://github.com/sanghinitin)) + + ### Changes not yet released to rubygems.org -#### Merged Pull Requests +### Merged Pull Requests + - Rebranding Change and the new version and change.log file [#11](https://github.com/chef/chef-test-kitchen-enterprise/pull/11) ([sanghinitin](https://github.com/sanghinitin)) + diff --git a/features/kitchen_init_command.feature b/features/kitchen_init_command.feature index a8e28b23f..78140778d 100644 --- a/features/kitchen_init_command.feature +++ b/features/kitchen_init_command.feature @@ -26,7 +26,7 @@ Feature: Add Test Kitchen support to an existing project And the file "kitchen.yml" should contain: """ driver: - name: vagrant + name: dokken """ And a file named "Gemfile" should not exist And a file named "Rakefile" should not exist @@ -40,7 +40,7 @@ Feature: Add Test Kitchen support to an existing project Then the file "Gemfile" should contain "https://rubygems.org" And the file "Gemfile" should contain: """ - gem "test-kitchen" + gem "chef-test-kitchen-enterprise" """ And the output should contain "You must run `bundle install'" @@ -56,7 +56,7 @@ Feature: Add Test Kitchen support to an existing project """ source "https://rubygems.org" - gem "test-kitchen" + gem "chef-test-kitchen-enterprise" """ And the output should contain "You must run `bundle install'" @@ -67,7 +67,7 @@ Feature: Add Test Kitchen support to an existing project """ source "https://rubygems.org" - gem 'test-kitchen' + gem "chef-test-kitchen-enterprise" """ When I successfully run `kitchen init` @@ -75,7 +75,7 @@ Feature: Add Test Kitchen support to an existing project """ source "https://rubygems.org" - gem 'test-kitchen' + gem "chef-test-kitchen-enterprise" """ @@ -85,7 +85,7 @@ Feature: Add Test Kitchen support to an existing project """ source "https://rubygems.org" - gem 'test-kitchen' + gem "chef-test-kitchen-enterprise" gem 'kitchen-ec2' """ @@ -94,7 +94,7 @@ Feature: Add Test Kitchen support to an existing project """ source "https://rubygems.org" - gem 'test-kitchen' + gem "chef-test-kitchen-enterprise" gem 'kitchen-ec2' """ @@ -122,13 +122,13 @@ Feature: Add Test Kitchen support to an existing project """ Scenario: Running init without a provisioner sets the default provisioner - to chef_solo in kitchen.yml + to dokken in kitchen.yml Given an empty file named "Gemfile" When I successfully run `kitchen init --no-driver` Then the file "kitchen.yml" should contain: """ provisioner: - name: chef_solo + name: dokken """ Scenario: Running init with a provisioner sets the provisioner in kitchen.yml @@ -190,10 +190,13 @@ Feature: Add Test Kitchen support to an existing project """ --- driver: - name: vagrant + name: dokken provisioner: - name: chef_solo + name: dokken + + transport: + name: dokken platforms: - name: ubuntu-20.04 @@ -214,10 +217,13 @@ Feature: Add Test Kitchen support to an existing project """ --- driver: - name: vagrant + name: dokken provisioner: - name: chef_solo + name: dokken + + transport: + name: dokken platforms: - name: ubuntu-20.04 @@ -237,10 +243,13 @@ Feature: Add Test Kitchen support to an existing project """ --- driver: - name: vagrant + name: dokken provisioner: - name: chef_solo + name: dokken + + transport: + name: dokken platforms: - name: ubuntu-20.04 diff --git a/lib/kitchen/generator/init.rb b/lib/kitchen/generator/init.rb index f73d35212..9842e9bf2 100644 --- a/lib/kitchen/generator/init.rb +++ b/lib/kitchen/generator/init.rb @@ -30,7 +30,7 @@ class Init < Thor::Group class_option :driver, type: :array, aliases: "-D", - default: %w{kitchen-vagrant}, + default: %w{kitchen-dokken}, desc: <<-D.gsub(/^\s+/, "").tr("\n", " ") One or more Kitchen Driver gems to be installed or added to a Gemfile @@ -39,11 +39,18 @@ class Init < Thor::Group class_option :provisioner, type: :string, aliases: "-P", - default: "chef_solo", + default: "dokken", desc: <<-D.gsub(/^\s+/, "").tr("\n", " ") The default Kitchen Provisioner to use D + class_option :transport, + type: :string, + aliases: "-T", + default: "dokken", + desc: <<-D.gsub(/^\s+/, "").tr("\n", " ") + The default Kitchen Transport to use + D class_option :create_gemfile, type: :boolean, default: false, @@ -81,6 +88,7 @@ def create_kitchen_yaml template("kitchen.yml.erb", "kitchen.yml", driver_plugin: driver_plugin.sub(/^kitchen-/, ""), provisioner: options[:provisioner], + transport: options[:transport], run_list: Array(run_list)) end @@ -213,8 +221,8 @@ def create_gemfile_if_missing # # @api private def add_gem_to_gemfile - if not_in_file?("Gemfile", /gem ('|")test-kitchen('|")/) - append_to_file("Gemfile", %{gem "test-kitchen"\n}) + if not_in_file?("Gemfile", /gem ('|")chef-test-kitchen-enterprise('|")/) + append_to_file("Gemfile", %{gem "chef-test-kitchen-enterprise"\n}) @display_bundle_msg = true end end diff --git a/templates/driver/gemspec.erb b/templates/driver/gemspec.erb index 9e23df737..67132fe79 100644 --- a/templates/driver/gemspec.erb +++ b/templates/driver/gemspec.erb @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ['lib'] - spec.add_dependency 'test-kitchen', '~> 1.0.0' + spec.add_dependency 'chef-test-kitchen-enterprise', '~> 1.0.0' spec.add_development_dependency 'bundler' spec.add_development_dependency 'rake' diff --git a/templates/init/kitchen.yml.erb b/templates/init/kitchen.yml.erb index 11e657858..b48009ac0 100644 --- a/templates/init/kitchen.yml.erb +++ b/templates/init/kitchen.yml.erb @@ -5,6 +5,9 @@ driver: provisioner: name: <%= config[:provisioner] %> +transport: + name: <%= config[:transport] %> + platforms: - name: ubuntu-20.04 - name: centos-8