From fb91c381c150bbb03383ed6328ba1da4517215ed Mon Sep 17 00:00:00 2001 From: Marco Vermeulen Date: Wed, 2 Sep 2020 17:45:43 +0100 Subject: [PATCH] Fix broken (false positive) test for pre/post hooks. --- .../pre_and_post_installation_hooks.feature | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/test/cucumber/pre_and_post_installation_hooks.feature b/src/test/cucumber/pre_and_post_installation_hooks.feature index c8a376d0..46ebf3bb 100644 --- a/src/test/cucumber/pre_and_post_installation_hooks.feature +++ b/src/test/cucumber/pre_and_post_installation_hooks.feature @@ -1,5 +1,7 @@ Feature: Hooks + We can safely remove this feature when `.tar.gz` and `.zip` are supported directly by the backend. + Background: Given the internet is reachable And an initialised environment @@ -7,26 +9,29 @@ Feature: Hooks Scenario: Pre- and Post-installation Hooks return successfully And a machine with "Linux" installed And the system is bootstrapped - And the candidate "java" version "8u92" is available for download on "Linux" - And a "pre" install hook is served for "java" "8u92" on "Linux" that returns successfully - And a "post" install hook is served for "java" "8u92" on "Linux" that returns successfully - When I enter "sdk install java 8u92" + And the candidate "grails" version "2.1.0" is available for download on "Linux" + And a "pre" install hook is served for "grails" "2.1.0" on "Linux" that returns successfully + And a "post" install hook is served for "grails" "2.1.0" on "Linux" that returns successfully + When I enter "sdk install grails 2.1.0" Then I see "Pre-installation hook success" And I see "Post-installation hook success" + And the exit code is 0 Scenario: Pre-installation Hook returns a non-zero code And a machine with "Linux" installed And the system is bootstrapped - And the candidate "java" version "8u92" is available for download on "Linux" - And a "pre" install hook is served for "java" "8u92" on "Linux" that returns a failure - When I enter "sdk install java 8u92" + And the candidate "grails" version "2.1.0" is available for download on "Linux" + And a "pre" install hook is served for "grails" "2.1.0" on "Linux" that returns a failure + When I enter "sdk install grails 2.1.0" Then I see "Pre-installation hook failure" + And the exit code is 1 Scenario: Post-install Hook returns a non-zero code And a machine with "Linux" installed And the system is bootstrapped - And the candidate "java" version "8u92" is available for download on "Linux" - And a "pre" install hook is served for "java" "8u92" on "Linux" that returns successfully - And a "post" install hook is served for "java" "8u92" on "Linux" that returns a failure - When I enter "sdk install java 8u92" + And the candidate "grails" version "2.1.0" is available for download on "Linux" + And a "pre" install hook is served for "grails" "2.1.0" on "Linux" that returns successfully + And a "post" install hook is served for "grails" "2.1.0" on "Linux" that returns a failure + When I enter "sdk install grails 2.1.0" Then I see "Post-installation hook failure" + And the exit code is 1