Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bO2Sw-0004Df-Nd for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 12:43:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bO2Sv-0006Pj-Sh for pgadmin-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 12:43:37 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bO2Sh-0006BD-Jp for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 12:43:23 +0000 Received: from mail-io0-x231.google.com ([2607:f8b0:4001:c06::231]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bO2SY-000751-MN for pgadmin-hackers@postgresql.org; Fri, 15 Jul 2016 12:43:21 +0000 Received: by mail-io0-x231.google.com with SMTP id 38so103116482iol.0 for ; Fri, 15 Jul 2016 05:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oBz/Nbaa1l7tYzWpI9PzO9QndrF4TKHsbzN7EFTBnAc=; b=OTCKtB4OCtNcjUIyMDm7ZCgUjq9NYSk5nsdE9/DVm+5Yp+k8xE8U3B+W1wA9LMfJgJ YHcm5Ra7ZS2tMAOtBSqmnEXGj8KerU9TV3b4aucNUq41BNC6WE4vqypuMpH5VcA39V/U 1r8jWmxLmXzjoYiItKqXLD4CVepGNc38Asm0qGgsvHIKjzerqS9f+b42KgiRPi2de7BS 9mLiZTx94gZJtBpnVl0Be1zBQkAoGbQmv2WUTXWokowTXJGVgwTgSMsi3jj12TTEACk7 IKueHWEXh1ANO7hT6poQcEPe9nXCEl8tYkkLrQ6Zacz6Ed4fHs4JCm9fcBySfBVlhzLF SiIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oBz/Nbaa1l7tYzWpI9PzO9QndrF4TKHsbzN7EFTBnAc=; b=T9vZTeynjsIy7Y8LnUlMN6L6gTc3e7aIh+NqAvnPn8XXM0hgF3wunsY7ft3qcRlM/D ItdTI33cvS0KE+VSXVECZXcb+SYk3gLqbxW+AYXylDkQv9FxaMDbWbbdwiOfCGqIA5AF /8kNdh8leM+QC0ZX/2CQDnS0xxP6iZ346bUgOhmQos2/3hS6S4ymzbn4fzUKjO0+PXst EEB4kBZshCKiCuXViPrYJ6hhQHwjtpU0hdrIJCYnUvR9u0ZR+Q18sFMDE8insg0RmadB r7fuyQFokPA1c8us2OymjFX1PTCKCdeZ5vOM1c7b1Vqjf2rUvMfLgIjOpeWNeyy4Fy3g WWHw== X-Gm-Message-State: ALyK8tJa5rcNWv8A4ciC2WWLYGcJQ2zd26cT4M0aqkGKDWHg3ecADdRIb/p3ndnRJc0tEwYFrc4WFawPdk+X1Q== X-Received: by 10.107.183.85 with SMTP id h82mr21341741iof.63.1468586593195; Fri, 15 Jul 2016 05:43:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.208.97 with HTTP; Fri, 15 Jul 2016 05:43:11 -0700 (PDT) In-Reply-To: References: <1C830532-F2F0-4FBC-BD17-4428CE9AA53D@pgadmin.org> From: Dave Page Date: Fri, 15 Jul 2016 13:43:11 +0100 Message-ID: Subject: Re: pgAdmin IV API test cases patch To: Priyanka Shendge Cc: pgadmin-hackers , Kanchan Mohitey , Khushboo Vashi Content-Type: text/plain; charset=UTF-8 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org Hi On Thu, Jul 14, 2016 at 12:50 PM, Priyanka Shendge wrote: > Hi Dave, > > I have added more debug statements to older patch. New patch attached. > Also, i removed database deletion test case from current patch so that we > can analyse > if database is added or not. OK. One quick note - somewhere along the way, test_advanced_config.json has been changed back to test_advance_config.json. The first is correct - please include that fix in the next patch. The database is added - assuming you're referring to one randomly named like bbb6cad or d602036? > I have added few more debug statements to database add test case. After > running the testsuite > can you please confirm whether the database is created or not under server > node? > > Could you please re-run the attached patch and send me the logs and output? Sure - all the interesting info is here: runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (TestCase for Checking Invalid_Password) ... ok runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (Empty_Password) ... ok runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (Empty_Email) ... ok runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (Empty_Creadentials) ... ok runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (Invalid_Email) ... ok runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (Invalid_Creadentials) ... ok runTest (pgadmin.browser.tests.test_login.LoginTestCase) This function checks login functionality. (Valid_Creadentials) ... ok runTest (pgadmin.browser.server_groups.tests.test_sg_add.SgNodeTestCase) This function will check available server groups. (Check Server Group Node) ... ok runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase) This function checks reset password functionality. (TestCase for Validating Empty Email) ... ok runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase) This function checks reset password functionality. (TestCase for Validating Invalid_Email) ... ok runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase) This function checks reset password functionality. (TestCase for Validating Valid_Email) ... ok runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase) This function will check change password functionality. (TestCase for Validating Incorrect_New_Password) ... ok runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase) This function will check change password functionality. (TestCase for Validating New_Password_Less_Than_Min_Length) ... ok runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase) This function will check change password functionality. (TestCase for Validating Empty_New_Password) ... ok runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase) This function will check change password functionality. (TestCase for Validating Incorrect_Current_Password) ... ok runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase) This function will check change password functionality. (TestCase for Changing Valid_Password) ... ok runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase) This function will check change password functionality. (Reassigning_Password) ... ok runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgGetTestCase) This function will check available server groups. (Check Server Group Node) ... ok runTest (pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase) This function will add the server under default server group. (Default Server Node url) ... ('\nServer id in server add', u'9') ok runTest (pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase) This function will fetch the added servers to object browser. (Default Server Node url) ... ok runTest (pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase) This function will update the server's comment field. (Default Server Node url) ... 2016-07-15 13:29:39,946: INFO pgadmin: Connection Request for server#9 FAIL runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase) This function will add database under 1st server of tree node. (Check Databases Node URL) ... 2016-07-15 13:29:39,956: INFO pgadmin: Connection Request for server#9 FAIL runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase) This function will fetch added database. (Check Databases Node URL) ... ('db id in get database from pickle:', 158619) ('Database Details From pickle: id in test nodes:', 158619) 2016-07-15 13:29:39,962: INFO pgadmin: Connection Request for server#9 ('Server Connection Response After Database Addition in test nodes', u'{"info": "", "errormsg": "Server not found.", "data": null, "result": null, "success": 0}') 2016-07-15 13:29:39,969: ERROR pgadmin: Exception on /browser/database/connect/1/9/158619 [POST] Traceback (most recent call last): File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line 235, in dispatch_request return method(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/__init__.py", line 334, in connect conn = manager.connection(did=did, auto_reconnect=True) AttributeError: 'NoneType' object has no attribute 'connection' ('Database Connection Response After Database Addition in test nodes', u'\n500 Internal Server Error\n

Internal Server Error

\n

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

\n') ERROR runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase) This function will update the comments field of database. (Check Databases Node) ... ('db id in update database from pickle:', 158619) ('Database Details From pickle: id in test nodes:', 158619) 2016-07-15 13:29:39,976: INFO pgadmin: Connection Request for server#9 ('Server Connection Response After Database Addition in test nodes', u'{"info": "", "errormsg": "Server not found.", "data": null, "result": null, "success": 0}') 2016-07-15 13:29:39,983: ERROR pgadmin: Exception on /browser/database/connect/1/9/158619 [POST] Traceback (most recent call last): File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/dpage/.virtualenvs/pgadmin4/lib/python2.7/site-packages/flask/views.py", line 84, in view return self.dispatch_request(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/utils.py", line 235, in dispatch_request return method(*args, **kwargs) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/__init__.py", line 334, in connect conn = manager.connection(did=did, auto_reconnect=True) AttributeError: 'NoneType' object has no attribute 'connection' ('Database Connection Response After Database Addition in test nodes', u'\n500 Internal Server Error\n

Internal Server Error

\n

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

\n') ERROR runTest (pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase) This function will get all available servers under object browser (Default Server Node url) ... ok runTest (pgadmin.browser.tests.test_logout.LogoutTest) This function checks the logout functionality. (Logging Out) ... ok ====================================================================== ERROR: runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase) This function will fetch added database. (Check Databases Node URL) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_get.py", line 38, in runTest db_con = test_getnodes(node=self) File "/Users/dpage/git/pgadmin4/web/regression/test_nodes.py", line 48, in test_getnodes db_con = json.loads(con_response.data.decode()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded ====================================================================== ERROR: runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase) This function will update the comments field of database. (Check Databases Node) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_put.py", line 39, in runTest db_con = test_getnodes(node=self) File "/Users/dpage/git/pgadmin4/web/regression/test_nodes.py", line 48, in test_getnodes db_con = json.loads(con_response.data.decode()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded ====================================================================== FAIL: runTest (pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase) This function will update the server's comment field. (Default Server Node url) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tests/test_server_put.py", line 64, in runTest self.assertTrue(respdata['success'], 1) AssertionError: 1 ====================================================================== FAIL: runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase) This function will add database under 1st server of tree node. (Check Databases Node URL) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_add.py", line 47, in runTest self.assertEquals(response.status_code, 200) AssertionError: 400 != 200 ---------------------------------------------------------------------- Ran 26 tests in 12.312s FAILED (failures=2, errors=2) ('Please check output in file: logger.log placed at', '/Users/dpage/git/pgadmin4/web/regression') Traceback (most recent call last): File "regression/testsuite.py", line 113, in os.remove("parent_id.pkl") OSError: [Errno 2] No such file or directory: 'parent_id.pkl' (pgadmin4)piranha:web dpage$ The output log doesn't seem to contain anything more useful. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers