This repository has been archived by the owner on Aug 29, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7656238
commit 51e1a17
Showing
4 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
@env_var @domain_required | ||
Feature: Environment Variables Operations | ||
|
||
@init | ||
Scenario: Application Creation | ||
When a php application is created | ||
Then the application should be accessible | ||
|
||
Scenario: Environment variable is set | ||
When a new environment variable "FOO" is set as "BAR" | ||
And the existing environment variables are listed | ||
Then the output environment variables include "FOO=BAR" | ||
|
||
Scenario: Environment variables are set | ||
When a new environment variable "FOO" is set as "BAR" | ||
And a new environment variable "FOO2" is set as "BAR2" | ||
And the existing environment variables are listed | ||
Then the output environment variables include "FOO=BAR" | ||
And the output environment variables include "FOO2=BAR2" | ||
|
||
Scenario: Environment variable is unset | ||
When a new environment variable "FOO" is set as "BAR" | ||
And the existing environment variables are listed | ||
Then the output environment variables include "FOO=BAR" | ||
When an existing environment variable with name "FOO" is unset | ||
Then the output environment variables do not include "FOO=BAR" | ||
|
||
# Scenario: Create app with environment variable | ||
# Scenario: add cartridge with environment variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
include RHCHelper | ||
|
||
When /^'rhc env (\S+)( .*?)?'(?: command)? is run$/ do |subcommand, rest| | ||
if subcommand =~ /^(list|show|set|unset)$/ | ||
Env.send subcommand.to_sym, rest | ||
@env_output = Env.env_output | ||
@exitcode = Env.exitcode | ||
end | ||
end | ||
|
||
When /^a new environment variable "(.*?)" is set as "(.*)"$/ do |name, value| | ||
step "'rhc env set --env #{name}=#{value} --app #{@app.name}' is run" | ||
end | ||
|
||
When /^an existing environment variable with name "(.*?)" is unset$/ do |name| | ||
step "'rhc env unset --env #{name} --app #{@app.name}' is run" | ||
end | ||
|
||
Given "the existing environment variables are listed" do | ||
step "'rhc env list --app #{@app.name}' is run" | ||
end | ||
|
||
Then /^the output environment variables (do not )?include "(.*)"$/ do |exclude, str| | ||
if exclude | ||
@env_output.should_not match(str) | ||
else | ||
@env_output.should match(str) | ||
end | ||
end |