mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-04-20 06:57:05 -04:00
Fix broken (false positive) test for pre/post hooks.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user