| 
1 | 1 | Feature: Hooks  | 
2 | 2 | 
 
  | 
 | 3 | +	We can safely remove this feature when `.tar.gz` and `.zip` are supported directly by the backend.  | 
 | 4 | +	  | 
3 | 5 | 	Background:  | 
4 | 6 | 		Given the internet is reachable  | 
5 | 7 | 		And an initialised environment  | 
6 | 8 | 
 
  | 
7 | 9 | 	Scenario: Pre- and Post-installation Hooks return successfully  | 
8 | 10 | 		And a machine with "Linux" installed  | 
9 | 11 | 		And the system is bootstrapped  | 
10 |  | -		And the candidate "java" version "8u92" is available for download on "Linux"  | 
11 |  | -		And a "pre" install hook is served for "java" "8u92" on "Linux" that returns successfully  | 
12 |  | -		And a "post" install hook is served for "java" "8u92" on "Linux" that returns successfully  | 
13 |  | -		When I enter "sdk install java 8u92"  | 
 | 12 | +		And the candidate "grails" version "2.1.0" is available for download on "Linux"  | 
 | 13 | +		And a "pre" install hook is served for "grails" "2.1.0" on "Linux" that returns successfully  | 
 | 14 | +		And a "post" install hook is served for "grails" "2.1.0" on "Linux" that returns successfully  | 
 | 15 | +		When I enter "sdk install grails 2.1.0"  | 
14 | 16 | 		Then I see "Pre-installation hook success"  | 
15 | 17 | 		And I see "Post-installation hook success"  | 
 | 18 | +		And the exit code is 0  | 
16 | 19 | 
 
  | 
17 | 20 | 	Scenario: Pre-installation Hook returns a non-zero code  | 
18 | 21 | 		And a machine with "Linux" installed  | 
19 | 22 | 		And the system is bootstrapped  | 
20 |  | -		And the candidate "java" version "8u92" is available for download on "Linux"  | 
21 |  | -		And a "pre" install hook is served for "java" "8u92" on "Linux" that returns a failure  | 
22 |  | -		When I enter "sdk install java 8u92"  | 
 | 23 | +		And the candidate "grails" version "2.1.0" is available for download on "Linux"  | 
 | 24 | +		And a "pre" install hook is served for "grails" "2.1.0" on "Linux" that returns a failure  | 
 | 25 | +		When I enter "sdk install grails 2.1.0"  | 
23 | 26 | 		Then I see "Pre-installation hook failure"  | 
 | 27 | +		And the exit code is 1  | 
24 | 28 | 
 
  | 
25 | 29 | 	Scenario: Post-install Hook returns a non-zero code  | 
26 | 30 | 		And a machine with "Linux" installed  | 
27 | 31 | 		And the system is bootstrapped  | 
28 |  | -		And the candidate "java" version "8u92" is available for download on "Linux"  | 
29 |  | -		And a "pre" install hook is served for "java" "8u92" on "Linux" that returns successfully  | 
30 |  | -		And a "post" install hook is served for "java" "8u92" on "Linux" that returns a failure  | 
31 |  | -		When I enter "sdk install java 8u92"  | 
 | 32 | +		And the candidate "grails" version "2.1.0" is available for download on "Linux"  | 
 | 33 | +		And a "pre" install hook is served for "grails" "2.1.0" on "Linux" that returns successfully  | 
 | 34 | +		And a "post" install hook is served for "grails" "2.1.0" on "Linux" that returns a failure  | 
 | 35 | +		When I enter "sdk install grails 2.1.0"  | 
32 | 36 | 		Then I see "Post-installation hook failure"  | 
 | 37 | +		And the exit code is 1  | 
0 commit comments