Skip to content

Commit

Permalink
Create liferay_home first on functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Jul 23, 2018
1 parent 4fc9e6c commit 4930472
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions features/deploy.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,58 @@ Feature: Deploy command
Scenario Outline: Deploy one single file when container exists
Given an empty file named "modules/a.jar"
When I run `lpn run <type> -t <tag>`
And I run `docker exec lpn-<type> mkdir -p <home>`
And I run `lpn deploy <type> -f modules/a.jar`
Then the output should contain:
"""
[modules/a.jar] deployed successfully to /liferay/deploy
[modules/a.jar] deployed successfully to <home>
"""
And I run `docker exec lpn-<type> ls -l /liferay/deploy | grep "a.jar" | wc -l | xargs`
And I run `docker exec lpn-<type> ls -l <home> | grep "a.jar" | wc -l | xargs`
And the output should contain:
"""
1
"""
And I run `lpn rm <type>`

Examples:
| type | tag |
| commerce | latest |
| nightly | latest |
| release | latest |
| type | tag | home |
| commerce | latest | /liferay/deploy |
| nightly | latest | /liferay/deploy |
| release | latest | /liferay/deploy |
| release | 7-ce-ga5-tomcat-hsql | /usr/local/liferay-ce-portal-7.0-ga5/deploy |

Scenario Outline: Deploy multiple file when container exists
Given an empty file named "modules/a.jar"
And an empty file named "modules/b.jar"
When I run `lpn run <type> -t <tag>`
And I run `docker exec lpn-<type> mkdir -p <home>`
And I run `lpn deploy <type> -f modules/a.jar,modules/b.jar`
Then the output should contain:
"""
[modules/a.jar] deployed successfully to /liferay/deploy
[modules/a.jar] deployed successfully to <home>
"""
And the output should contain:
"""
[modules/b.jar] deployed successfully to /liferay/deploy
[modules/b.jar] deployed successfully to <home>
"""
And I run `docker exec lpn-<type> ls -l /liferay/deploy | grep "a.jar" | wc -l | xargs`
And I run `docker exec lpn-<type> ls -l <home> | grep "a.jar" | wc -l | xargs`
And the output should contain:
"""
1
"""
And I run `docker exec lpn-<type> ls -l /liferay/deploy | grep "b.jar" | wc -l | xargs`
And I run `docker exec lpn-<type> ls -l <home> | grep "b.jar" | wc -l | xargs`
And the output should contain:
"""
1
"""
And I run `lpn rm <type>`

Examples:
| type | tag |
| commerce | latest |
| nightly | latest |
| release | latest |
| type | tag | home |
| commerce | latest | /liferay/deploy |
| nightly | latest | /liferay/deploy |
| release | latest | /liferay/deploy |
| release | 7-ce-ga5-tomcat-hsql | /usr/local/liferay-ce-portal-7.0-ga5/deploy |

Scenario Outline: Deploy command with no flags
When I run `lpn run <type> -t <tag>`
Expand Down Expand Up @@ -117,6 +121,7 @@ Feature: Deploy command
Given an empty directory named "modules/skip1"
And an empty directory named "modules/skip2"
When I run `lpn run <type> -t <tag>`
And I run `docker exec lpn-<type> mkdir -p <home>`
And I run `lpn deploy <type> -d modules`
Then the output should not contain:
"""
Expand Down

0 comments on commit 4930472

Please sign in to comment.