From 3fa986b4fe3478aa05a52db8047a6886da389954 Mon Sep 17 00:00:00 2001 From: veronicaaruquipa Date: Tue, 9 Dec 2014 14:16:50 -0400 Subject: [PATCH] Remove undefined steps and were corrected some input data. --- ...n_tests_database_connections_mysql.feature | 1 - ...sts_database_connections_sqlserver.feature | 2 +- ...egative_tests_database_connections.feature | 4 +- features/bootstrap/RestContext.php | 38 +------------------ 4 files changed, 4 insertions(+), 41 deletions(-) diff --git a/features/backend/projects/database_connections/main_tests_database_connections_mysql.feature b/features/backend/projects/database_connections/main_tests_database_connections_mysql.feature index 992dc54f1..0ff969058 100644 --- a/features/backend/projects/database_connections/main_tests_database_connections_mysql.feature +++ b/features/backend/projects/database_connections/main_tests_database_connections_mysql.feature @@ -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//database-connections diff --git a/features/backend/projects/database_connections/main_tests_database_connections_sqlserver.feature b/features/backend/projects/database_connections/main_tests_database_connections_sqlserver.feature index 4b69b9d90..ec3c2530d 100644 --- a/features/backend/projects/database_connections/main_tests_database_connections_sqlserver.feature +++ b/features/backend/projects/database_connections/main_tests_database_connections_sqlserver.feature @@ -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//database-connections # Get list DataBase Connections diff --git a/features/backend/projects/database_connections/negative_tests_database_connections.feature b/features/backend/projects/database_connections/negative_tests_database_connections.feature index e4beb0773..d32e9733e 100644 --- a/features/backend/projects/database_connections/negative_tests_database_connections.feature +++ b/features/backend/projects/database_connections/negative_tests_database_connections.feature @@ -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 | | | | | | | 33O6 | | | - | | | | | | 33O6 | | | \ No newline at end of file + | | | | | | 33o6 | | | \ No newline at end of file diff --git a/features/bootstrap/RestContext.php b/features/bootstrap/RestContext.php index c81f12b34..87c1d4f43 100644 --- a/features/bootstrap/RestContext.php +++ b/features/bootstrap/RestContext.php @@ -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 */ @@ -1929,7 +1893,7 @@ class RestContext extends BehatContext */ public function databaseConnectionWithIdIsActive($dbConnectionId) { - if (file_exists("session.data")) { + if (file_exists("session.data")) { $sessionData = json_decode(file_get_contents("session.data")); } else { $sessionData = new StdClass();