[DRE-commits] [test-kitchen] 20/39: Patches for cucumber tests

Hleb Valoshka tsfgnu-guest at moszumanska.debian.org
Fri Aug 5 12:46:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

tsfgnu-guest pushed a commit to branch master
in repository test-kitchen.

commit 24bc3fcf4afd1b42b3a1292069de758fb4a8391d
Author: Hleb Valoshka <375gnu at gmail.com>
Date:   Thu Jul 9 14:16:32 2015 +0300

    Patches for cucumber tests
---
 .../0001-Do-not-run-test-for-winrm-transport.patch | 33 +++++++++++++++--
 ...move-Gemfile-to-prevent-bundler-execution.patch | 29 +++++++++++++++
 debian/patches/0011-Hack-Clear-LOAD_PATH.patch     | 18 ++++++++++
 debian/patches/0012-Disable-networked-tests.patch  | 21 +++++++++++
 ...o-not-run-gem-install-during-kitchen-init.patch | 41 ++++++++++++++++++++++
 debian/patches/series                              |  4 +++
 6 files changed, 144 insertions(+), 2 deletions(-)

diff --git a/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch b/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch
index 7a16387..920ac4c 100644
--- a/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch
+++ b/debian/patches/0001-Do-not-run-test-for-winrm-transport.patch
@@ -3,9 +3,38 @@ Date: Mon, 29 Jun 2015 20:31:56 +0300
 Subject: Do not run test for winrm transport
 
 ---
- spec/kitchen/transport/winrm_spec.rb | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ features/kitchen_defaults.feature    | 17 -----------------
+ spec/kitchen/transport/winrm_spec.rb |  3 ++-
+ 2 files changed, 2 insertions(+), 18 deletions(-)
 
+diff --git a/features/kitchen_defaults.feature b/features/kitchen_defaults.feature
+index f0c1c32..dda98a8 100644
+--- a/features/kitchen_defaults.feature
++++ b/features/kitchen_defaults.feature
+@@ -3,23 +3,6 @@ Feature: Test Kitchen defaults
+   As a user of Test Kitchen
+   I want to have some common defaults handled for me
+ 
+-  Scenario: Windows platforms get the Winrm Transport by default
+-    Given a file named ".kitchen.yml" with:
+-    """
+-    ---
+-    driver: dummy
+-    provisioner: dummy
+-    verifier: dummy
+-
+-    platforms:
+-      - name: win-8.1
+-
+-    suites:
+-      - name: default
+-    """
+-    When I successfully run `kitchen list`
+-    Then the output should match /^default-win-81\s+Dummy\s+Dummy\s+Dummy\s+Winrm\s+\<Not Created\>$/
+-
+   Scenario: Non-Windows platforms get the Ssh Transport by default
+     Given a file named ".kitchen.yml" with:
+     """
 diff --git a/spec/kitchen/transport/winrm_spec.rb b/spec/kitchen/transport/winrm_spec.rb
 index 6af55a3..cdbd601 100644
 --- a/spec/kitchen/transport/winrm_spec.rb
diff --git a/debian/patches/0010-Remove-Gemfile-to-prevent-bundler-execution.patch b/debian/patches/0010-Remove-Gemfile-to-prevent-bundler-execution.patch
new file mode 100644
index 0000000..e36b042
--- /dev/null
+++ b/debian/patches/0010-Remove-Gemfile-to-prevent-bundler-execution.patch
@@ -0,0 +1,29 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 9 Jul 2015 14:15:55 +0300
+Subject: Remove Gemfile to prevent bundler execution
+
+---
+ Gemfile | 14 --------------
+ 1 file changed, 14 deletions(-)
+ delete mode 100644 Gemfile
+
+diff --git a/Gemfile b/Gemfile
+deleted file mode 100644
+index ff48e2f..0000000
+--- a/Gemfile
++++ /dev/null
+@@ -1,14 +0,0 @@
+-# -*- encoding: utf-8 -*-
+-source "https://rubygems.org"
+-gemspec
+-
+-group :guard do
+-  gem "guard-minitest"
+-  gem "guard-cucumber", "~> 1.4"
+-  gem "guard-rubocop"
+-  gem "guard-yard"
+-end
+-
+-group :test do
+-  gem "codeclimate-test-reporter", :require => nil
+-end
diff --git a/debian/patches/0011-Hack-Clear-LOAD_PATH.patch b/debian/patches/0011-Hack-Clear-LOAD_PATH.patch
new file mode 100644
index 0000000..0e307d2
--- /dev/null
+++ b/debian/patches/0011-Hack-Clear-LOAD_PATH.patch
@@ -0,0 +1,18 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 9 Jul 2015 17:30:33 +0300
+Subject: Hack: Clear $LOAD_PATH
+
+---
+ features/support/env.rb | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/features/support/env.rb b/features/support/env.rb
+index dad6a73..f7bdcab 100644
+--- a/features/support/env.rb
++++ b/features/support/env.rb
+@@ -1,4 +1,5 @@
+ # -*- encoding: utf-8 -*-
++$LOAD_PATH.delete 'lib'
+ 
+ # Set up the environment for testing
+ require "aruba/cucumber"
diff --git a/debian/patches/0012-Disable-networked-tests.patch b/debian/patches/0012-Disable-networked-tests.patch
new file mode 100644
index 0000000..17f6e9e
--- /dev/null
+++ b/debian/patches/0012-Disable-networked-tests.patch
@@ -0,0 +1,21 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 9 Jul 2015 17:46:21 +0300
+Subject: Disable networked tests
+
+---
+ features/kitchen_driver_discover_command.feature | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/features/kitchen_driver_discover_command.feature b/features/kitchen_driver_discover_command.feature
+index 6ebefd3..d7741a2 100644
+--- a/features/kitchen_driver_discover_command.feature
++++ b/features/kitchen_driver_discover_command.feature
+@@ -12,8 +12,3 @@ Feature: Search RubyGems to discover new Test Kitchen Driver gems
+       kitchen driver discover
+     """
+     And the exit status should be 0
+-
+-  Scenario: Running driver discover returns live results
+-    When I run `kitchen driver discover`
+-    Then the exit status should be 0
+-    And the output should contain "kitchen-bluebox"
diff --git a/debian/patches/0013-Do-not-run-gem-install-during-kitchen-init.patch b/debian/patches/0013-Do-not-run-gem-install-during-kitchen-init.patch
new file mode 100644
index 0000000..fdfcd7b
--- /dev/null
+++ b/debian/patches/0013-Do-not-run-gem-install-during-kitchen-init.patch
@@ -0,0 +1,41 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Thu, 9 Jul 2015 18:34:28 +0300
+Subject: Do not run `gem install` during `kitchen init`
+
+---
+ features/kitchen_init_command.feature | 2 +-
+ lib/kitchen/generator/init.rb         | 8 +++++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/features/kitchen_init_command.feature b/features/kitchen_init_command.feature
+index 0e2de6d..3683f28 100644
+--- a/features/kitchen_init_command.feature
++++ b/features/kitchen_init_command.feature
+@@ -30,7 +30,7 @@ Feature: Add Test Kitchen support to an existing project
+     And a file named "Gemfile" should not exist
+     And a file named "Rakefile" should not exist
+     And a file named "Thorfile" should not exist
+-    And a gem named "kitchen-vagrant" is installed
++    And the output should contain "apt install ruby-kitchen-vagrant"
+     And a file named "chefignore" should exist
+     And the file "chefignore" should contain ".kitchen"
+ 
+diff --git a/lib/kitchen/generator/init.rb b/lib/kitchen/generator/init.rb
+index fa69cbf..1cdd803 100644
+--- a/lib/kitchen/generator/init.rb
++++ b/lib/kitchen/generator/init.rb
+@@ -239,7 +239,13 @@ module Kitchen
+           if File.exist?(File.join(destination_root, "Gemfile")) || options[:create_gemfile]
+             add_driver_to_gemfile(driver_gem)
+           else
+-            install_gem(driver_gem)
++            say "Debian version of kitchen doesn't install driver gem itself.", :yellow
++            if driver_gem !~ /\Aruby-/ then
++              say "Use `apt install ruby-#{driver_gem}' to install it.", :yellow
++              say "Or, if it isn't packaged yet, then use `gem install #{driver_gem}'.", :yellow
++            else
++              say "Use `apt install #{driver_gem}' to install it.", :yellow
++            end
+           end
+         end
+       end
diff --git a/debian/patches/series b/debian/patches/series
index 9eca0d5..c12c8f1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,7 @@
 0007-Disable-test-failing-under-Gem2Deb-Rake-TestTask.patch
 0008-Look-for-templates-in-usr-share-test-kitchen-templat.patch
 0009-Use-apt-to-install-pry.patch
+0010-Remove-Gemfile-to-prevent-bundler-execution.patch
+0011-Hack-Clear-LOAD_PATH.patch
+0012-Disable-networked-tests.patch
+0013-Do-not-run-gem-install-during-kitchen-init.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/test-kitchen.git



More information about the Pkg-ruby-extras-commits mailing list