Remove undefined steps and were corrected some input data.
This commit is contained in:
@@ -8,7 +8,6 @@ Feature: DataBase Connections Main Tests Mysql
|
|||||||
# MySQL is tagged like 1
|
# MySQL is tagged like 1
|
||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
Given that I have a valid access_token
|
||||||
And database tagged like 1
|
|
||||||
|
|
||||||
|
|
||||||
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
|
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Feature: DataBase Connections Main Tests SQL Server
|
|||||||
# Microsoft SQL Server is tagged like 2
|
# Microsoft SQL Server is tagged like 2
|
||||||
Background:
|
Background:
|
||||||
Given that I have a valid access_token
|
Given that I have a valid access_token
|
||||||
And database tagged like 2
|
|
||||||
|
|
||||||
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
|
# GET /api/1.0/{workspace}/project/<project-id>/database-connections
|
||||||
# Get list DataBase Connections
|
# Get list DataBase Connections
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ Feature: DataBase Connections Negative Tests
|
|||||||
"""
|
"""
|
||||||
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
And I request "project/74737540052e1641ab88249082085472/database-connection"
|
||||||
Then the response status code should be 400
|
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:
|
Examples:
|
||||||
| dbs_type | dbs_server | dbs_database_name | dbs_username | dbs_password | dbs_port | dbs_encode | dbs_description |
|
| 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> |
|
| <mys_db_type> | <mys_db_server> | <mys_db_name> | <mys_db_username> | <mys_db_password> | 33o6 | <mys_db_encode> | <mys_db_description> |
|
||||||
@@ -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
|
* @BeforeScenario @MysqlDbConnection
|
||||||
*/
|
*/
|
||||||
@@ -1929,7 +1893,7 @@ class RestContext extends BehatContext
|
|||||||
*/
|
*/
|
||||||
public function databaseConnectionWithIdIsActive($dbConnectionId)
|
public function databaseConnectionWithIdIsActive($dbConnectionId)
|
||||||
{
|
{
|
||||||
if (file_exists("session.data")) {
|
if (file_exists("session.data")) {
|
||||||
$sessionData = json_decode(file_get_contents("session.data"));
|
$sessionData = json_decode(file_get_contents("session.data"));
|
||||||
} else {
|
} else {
|
||||||
$sessionData = new StdClass();
|
$sessionData = new StdClass();
|
||||||
|
|||||||
Reference in New Issue
Block a user