Remove undefined steps and were corrected some input data.

This commit is contained in:
veronicaaruquipa
2014-12-09 14:16:50 -04:00
parent c6eec5b444
commit 3fa986b4fe
4 changed files with 4 additions and 41 deletions

View File

@@ -8,7 +8,6 @@ Feature: DataBase Connections Main Tests Mysql
# MySQL is tagged like 1
Background:
Given that I have a valid access_token
And database tagged like 1
# GET /api/1.0/{workspace}/project/<project-id>/database-connections

View File

@@ -8,7 +8,7 @@ Feature: DataBase Connections Main Tests SQL Server
# Microsoft SQL Server is tagged like 2
Background:
Given that I have a valid access_token
And database tagged like 2
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
# Get list DataBase Connections

View File

@@ -47,9 +47,9 @@ Feature: DataBase Connections Negative Tests
"""
And I request "project/74737540052e1641ab88249082085472/database-connection"
Then the response status code should be 400
And the response status message should have the following text "port"
And the response status message should have the following text "Error"
Examples:
| dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | 33O6 | <mys_db_encode> | <mys_db_description> |
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | 33O6 | <mys_db_encode> | <mys_db_description> |
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | 33o6 | <mys_db_encode> | <mys_db_description> |

View File

@@ -87,42 +87,6 @@ class RestContext extends BehatContext
}
}
/**
* @BeforeScenario @DbConnection
*/
public function verifyAllRequiredDataToConnectDB($db_type)
{
$db_parameters = null;
if ($db_type === 1){
$db_parameters = array(
'mys_db_type',
'mys_db_server',
'mys_db_name',
'mys_db_username',
'mys_db_password',
'mys_db_port',
'mys_db_encode',
'mys_db_description');
}elseif($db_type === 2){
$db_parameters = array(
'sqlsrv_db_type',
'sqlsrv_db_server',
'sqlsrv_db_name',
'sqlsrv_db_username',
'sqlsrv_db_password',
'sqlsrv_db_port',
'sqlsrv_db_encode',
'sqlsrv_db_description');
}
foreach ($db_parameters as $value) {
$param = $this->getParameter($value);
if (!isset($param)){
throw new PendingException("Parameter ".$value." is not defined or is empty, please review behat.yml file!");
}
}
}
/**
* @BeforeScenario @MysqlDbConnection
*/