From ed0bbc696aa8d78dfa1997eba55d6dfe19ce0f0a Mon Sep 17 00:00:00 2001 From: Bruno Michel <bmichel@menfin.info> Date: Tue, 17 Apr 2018 14:09:45 +0200 Subject: [PATCH] Use pry-rescue for debug --- tests/sharing/Gemfile | 1 + tests/sharing/Gemfile.lock | 5 +++++ tests/sharing/lib/stack.rb | 8 ++++---- tests/sharing/tests/push_folder.rb | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/sharing/Gemfile b/tests/sharing/Gemfile index eb420d32a..f48ca77e6 100644 --- a/tests/sharing/Gemfile +++ b/tests/sharing/Gemfile @@ -3,4 +3,5 @@ source 'https://rubygems.org' gem "awesome_print" gem "faker" gem "pry" +gem "pry-rescue" gem "rest-client" diff --git a/tests/sharing/Gemfile.lock b/tests/sharing/Gemfile.lock index 1c6aa2035..c91fb68c4 100644 --- a/tests/sharing/Gemfile.lock +++ b/tests/sharing/Gemfile.lock @@ -12,6 +12,7 @@ GEM domain_name (~> 0.5) i18n (1.0.0) concurrent-ruby (~> 1.0) + interception (0.5) method_source (0.9.0) mime-types (3.1) mime-types-data (~> 3.2015) @@ -20,6 +21,9 @@ GEM pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) + pry-rescue (1.4.5) + interception (>= 0.5) + pry rest-client (2.0.2) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) @@ -35,6 +39,7 @@ DEPENDENCIES awesome_print faker pry + pry-rescue rest-client BUNDLED WITH diff --git a/tests/sharing/lib/stack.rb b/tests/sharing/lib/stack.rb index 538064271..5ac5652cf 100644 --- a/tests/sharing/lib/stack.rb +++ b/tests/sharing/lib/stack.rb @@ -30,17 +30,17 @@ class Stack cmd = ["cozy-stack", "instances", "add", inst.domain, "--dev", "--passphrase", inst.passphrase, "--public-name", inst.name, "--email", inst.email, "--settings", "context:test", - "--admin-port", @admin, "--locale", "fr"] + "--admin-port", @admin.to_s, "--locale", "fr"] puts cmd.join(" ").green - system cmd.join(" ") + system(*cmd) end def install_app(inst, app) key = inst.domain + "/" + app return if @apps[key] cmd = ["cozy-stack", "apps", "install", app, - "--domain", inst.domain, - "--port", @port, "--admin-port", @admin] + "--port", @port, "--admin-port", @admin, + "--domain", inst.domain, ">", "/dev/null"] puts cmd.join(" ").green @apps[key] = system cmd.join(" ") end diff --git a/tests/sharing/tests/push_folder.rb b/tests/sharing/tests/push_folder.rb index 290abae07..67d04b977 100755 --- a/tests/sharing/tests/push_folder.rb +++ b/tests/sharing/tests/push_folder.rb @@ -2,6 +2,7 @@ require_relative '../boot' require 'minitest/autorun' +require 'pry-rescue/minitest' describe "A folder" do Helpers.scenario "push_folder" -- GitLab