From 3ddf15e9f2aabe68e3064baa86baa03de888bfee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Sat, 21 Jan 2017 13:44:05 +0100 Subject: [PATCH 1/3] kitchen-docker fixups for running locally Don't really know why it works on Travis without `privileged: true`, but I needed it locally for `ulimit` to work properly when on a Linux host that is, it works perfectly fine without this on macOS. --- .kitchen.docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.kitchen.docker.yml b/.kitchen.docker.yml index 470a15a7..bcade602 100644 --- a/.kitchen.docker.yml +++ b/.kitchen.docker.yml @@ -4,6 +4,8 @@ driver: memory: '512m' cpu: 2 use_sudo: false + privileged: <%= ENV['TRAVIS'] ? false : true %> + add_host: <%= ENV['TRAVIS'] ? [] : [['localhost.localdomain', '127.0.0.1']] %> provisioner: name: 'chef_solo' require_chef_omnibus: false From a1ac63f4ce01bc9312ff6bb4967a77663383be72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Sat, 21 Jan 2017 14:32:57 +0100 Subject: [PATCH 2/3] Wait a bit longer for start/stop Saw this timeout on Travis and then succeeding when restarted, so sometimes I guess it's a little slower. --- test/integration/helpers/serverspec/support/service_common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/helpers/serverspec/support/service_common.rb b/test/integration/helpers/serverspec/support/service_common.rb index 489db428..43a750b3 100644 --- a/test/integration/helpers/serverspec/support/service_common.rb +++ b/test/integration/helpers/serverspec/support/service_common.rb @@ -54,7 +54,7 @@ def start_kafka(wait = false) result = run_command(start_command_string) if wait && result.exit_status.zero? - await(10) do + await do File.exist?(log_file_path) && File.read(log_file_path).match(start_regexp) end end @@ -64,7 +64,7 @@ def start_kafka(wait = false) def stop_kafka(wait = false) result = run_command(stop_command_string) if wait && result.exit_status.zero? - await(10) { File.exist?(log_file_path) && File.read(log_file_path).match(stop_regexp) } + await { File.exist?(log_file_path) && File.read(log_file_path).match(stop_regexp) } end result end From 31126d9d078bf7ebcb8f4e31a3c4b0878ab995ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20S=C3=B6derberg?= Date: Sat, 21 Jan 2017 21:10:12 +0100 Subject: [PATCH 3/3] Version lock test dependencies --- Berksfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Berksfile b/Berksfile index 3bf4e78e..c574aa45 100644 --- a/Berksfile +++ b/Berksfile @@ -3,6 +3,6 @@ source 'https://api.berkshelf.com' metadata group :test do - cookbook 'apt' - cookbook 'java' + cookbook 'java', '~> 1.22.0' + cookbook 'apt', '< 4.0' end