public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dave Page <[email protected]>
To: Priyanka Shendge <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Kanchan Mohitey <[email protected]>
Cc: Khushboo Vashi <[email protected]>
Subject: Re: pgAdmin IV API test cases patch
Date: Fri, 15 Jul 2016 13:43:11 +0100
Message-ID: <CA+OCxox9NnHp+BYVr=WGBMCGeh1Qw4JE04nzqt9tvYe3XQ2grg@mail.gmail.com> (raw)
In-Reply-To: <CAKmZXFRD=eUCML8ecERuS52F+TRMUJUgBKyRnmg2cKV994LjFw@mail.gmail.com>
References: <CAKmZXFQ2Hj1-OZpSGFEBB-vOypQ_=1b4Yr_VytZ-E1=CBw9Yhw@mail.gmail.com>
	<CA+OCxow8Q83e7Tm+BC2bxq=oqwd-m4JS3y2KpzgFemc=wX=f=A@mail.gmail.com>
	<CAKmZXFTX9D_qOXGrvPa9sfFjc1A6VPebcpBn7vyzPEOH4pWfEg@mail.gmail.com>
	<CAKmZXFRj8yY91TTxwQQ01eOQE8Rc7FPWuxGcjxaVY+QcWpgWDg@mail.gmail.com>
	<CA+OCxoyqfK8pUGGmeO=5pyC=MOizNMOnfshAfgQ5NjMRnkjgmA@mail.gmail.com>
	<CAKmZXFSgdtd9NDE=TysR68_tcwqFB2Sv-h+qK4K4i1HjxOd5ng@mail.gmail.com>
	<CAKmZXFRWXd7ZrUhpJt-rD_YOE1xcK5haE1CwAj8DMVyS9Fs6yA@mail.gmail.com>
	<CA+OCxoyiNMAem5bYAZ1XM16vK4wJETCCPncRgKYbVdmH2m4Ocg@mail.gmail.com>
	<CAKmZXFRvn8JDL52ooxZYtrf0Aw+bMz6=spXmyP9Q7fq8kWjuDA@mail.gmail.com>
	<CA+OCxowzMWyATh1_eEQ7hnrseaxuq8T3_+FDsCETLm=WaoRNEw@mail.gmail.com>
	<CAKmZXFT34JxCPw=UbZ27jU8uL0KzFa3Lfpmge2V14F7GynGLWw@mail.gmail.com>
	<CAKmZXFRfX+Us9Bg2ACFGvGLTjjW02XETLEj3h5cHnZZBAbZwEQ@mail.gmail.com>
	<CA+OCxow+V_RU2y1q07R07UzZOmxLh+3WouSpwMXkYiz4v_V=qw@mail.gmail.com>
	<CAKmZXFTSYiZxVNe6FYkL-eDYk=yzpnLxdotGcek6zmp9f5S41g@mail.gmail.com>
	<[email protected]>
	<CAKmZXFRfZ6Y0eJK8k1FdvWX_V6A8bCdxJzBuWaJ0-nRWDsaOQA@mail.gmail.com>
	<CA+OCxozaBcEgbEou9sizQ8RTiCLHZqtpwH+iwbjf8sjAVAhsfQ@mail.gmail.com>
	<CAKmZXFQztUyBj0eOWZFOS-KcM19vdoqeRokX7ZdOMB4ATji2ig@mail.gmail.com>
	<CA+OCxowmy0nD8JzAWwYrzTHc274WJSsdA5gLJ2YuRpR_pfKvrA@mail.gmail.com>
	<CAKmZXFSn6LfpDm4xzrFppJOfHwWeSyP4fpF9z3dFzVATxn-X5w@mail.gmail.com>
	<CA+OCxoz9yyovU4vb3ZT9q=JQD1NjrdnVp9JExVZ1_QtaEef4xg@mail.gmail.com>
	<CAKmZXFQw7CQsJ9YF3ja15njHfDRC5bHnGLbmCXB1UHCzKCc9Lg@mail.gmail.com>
	<CAFOhELdqD6+RD_4EmpS7nAYwq5OpJH78CZiq1yo3xrr9hk00BA@mail.gmail.com>
	<CA+OCxozmKWcLkthAqd-1jue1RFEjq1ZtCO1U9k+rQE3sgp8MFA@mail.gmail.com>
	<CAKmZXFRD=eUCML8ecERuS52F+TRMUJUgBKyRnmg2cKV994LjFw@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi

On Thu, Jul 14, 2016 at 12:50 PM, Priyanka Shendge
<[email protected]> 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'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n<title>500
Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>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.</p>\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'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">\n<title>500
Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>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.</p>\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 <module>
    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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




view thread (27+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: pgAdmin IV API test cases patch
  In-Reply-To: <CA+OCxox9NnHp+BYVr=WGBMCGeh1Qw4JE04nzqt9tvYe3XQ2grg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox