Re: pgAdmin IV : Unittest modular patch

Поиск
Список
Период
Сортировка
От Navnath Gadakh
Тема Re: pgAdmin IV : Unittest modular patch
Дата
Msg-id CAOAJCYo4Lyc3f+-6a7cYxsxjn9GKG7j7R8VYiDmxgrntyds-xg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgAdmin IV : Unittest modular patch  (Dave Page <dave.page@enterprisedb.com>)
Ответы Re: pgAdmin IV : Unittest modular patch  (Dave Page <dave.page@enterprisedb.com>)
Список pgadmin-hackers
Hi Dave,

On Mon, Aug 1, 2016 at 3:17 PM, Dave Page <dave.page@enterprisedb.com> wrote:
> On Thu, Jul 28, 2016 at 8:12 AM, Navnath Gadakh
> <navnath.gadakh@enterprisedb.com> wrote:
>> Thanks Dave!
>>
>> On Wed, Jul 27, 2016 at 8:12 PM, Dave Page <dave.page@enterprisedb.com> wrote:
>>> Ahh, that explains it. Nice catch! It's working in both server and
>>> desktop modes now :-).
>>>
>>> I've committed the patch, but can you please look at the following issues:
>>>
>>> 1) When testing SMTP, the encoded password used to connect to the
>>> server is displayed in both the logs and stdout (the "send: 'AUTH
>>> PLAIN ....'" lines). Can you catch that, and replace it with *'s
>>> please? Sooner or later someone will reveal a password otherwise.
        Could you please send me your's regression.log file. While
testing SMTP I didn't see encoded password displayed on both logs and
stdout.
>>>
>>> 2) Is the test count in the summary correct when you have multiple
>>> servers? I think it might be resetting between servers.
>>      In the current code runTest() function calls only one time for
>> single/multiple server/s that's why it's showing same count for both
>> (single & multiple).
>>    Question: What exactly we are looking for, only count? Or we need
>> any more logs like for adding database, it should display in which
>> server (PG/PPAS) its adding database if this is the case we need a
>> feasibility check.
>
> Right now I would like to see the summary updated so it outputs useful
> (and correct) information - for example, it could say something like:
>
> =====
> Testing completed:
>
> PostgreSQL 9.4:  23 tests passed, 0 tests failed
> EPAS 9.5:            25 tests passed, 2 tests failed (foo_test, bar_test)
> =====
>
> where PostgreSQL 9.4 and EPAS 9.5 are the two servers configured in
> test_config.py and foo_test and bar_test are the names of the tests
> that failed.
   Thanks for additional info.
>
>>> 3) Please ensure that test databases that are created are also dropped
>>> again. I'm getting tired of deleting them manually!
>>     I already added delete databases in tearDown () function, But
>> yeah, I found two test cases where this code missed. I will add this
>> in the next patch.
>
> Thanks.
>
>>>
>>> Thanks, Dave.
>>>
>>> On Wed, Jul 27, 2016 at 1:19 PM, Navnath Gadakh
>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>> Hi Dave,
>>>>       We have reproduced the issue you mentioned in the previous
>>>> email. We need to skip the login related test cases when SERVER_MODE =
>>>> False in the web/config_local.py.
>>>>
>>>> Please find the revised patch for the same.
>>>>
>>>> Thanks!
>>>>
>>>>
>>>> On Fri, Jul 22, 2016 at 9:48 PM, Dave Page <dave.page@enterprisedb.com> wrote:
>>>>> Hi
>>>>>
>>>>> On Fri, Jul 22, 2016 at 2:22 PM, Navnath Gadakh
>>>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>>>> Hi Dave,
>>>>>>
>>>>>>    Please find the attached patch for pgAdmin4 unittest(Support of API
>>>>>> testing with different servers i.e. PG and PPAS).
>>>>>>
>>>>>> This patch includes-
>>>>>>
>>>>>> Test framework support API testing with multiple server for this we need to
>>>>>> modify test_config.json(for user it’s test_config.json.in) and
>>>>>> test_advanced_config.json(for user it’s test_advanced_config.json.in).
>>>>>> Server details of PG and  PPAS are included in both .in files.
>>>>>>
>>>>>> Removed the logic of logging in  the test client on each test scenario(As
>>>>>> per Khushboo's comment in previous email).  We need this logic in test cases
>>>>>> under ‘browser/tests/’ as for test scenarios like change password and
>>>>>> invalid login test cases as test client should be logged out first. So, as
>>>>>> per this the code is slightly modified in ‘browser/tests/’.
>>>>>
>>>>> OK in principle, but it doesn't seem to work:
>>>>>
>>>>> This function will add the server under default server group. (Default
>>>>> Server Node url) ... ok
>>>>>
>>>>> ======================================================================
>>>>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
>>>>> This function checks reset password functionality. (TestCase for
>>>>> Validating Empty Email)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset_password.py",
>>>>> line 44, in runTest
>>>>>     'utf-8'))
>>>>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'<!DOCTYPE
>>>>> HTML PUBLIC "-//W3C//DTD HTML 3.2
>>>>> Final//EN">\n<title>Redirecting...</title>\n<h1>Redirecting...</h1>\n<p>You
>>>>> should be redirected automatically to target URL: <a href="/">/</a>.
>>>>> If not click the link.'
>>>>>
>>>>> ======================================================================
>>>>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
>>>>> This function checks reset password functionality. (TestCase for
>>>>> Validating Invalid_Email)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset_password.py",
>>>>> line 44, in runTest
>>>>>     'utf-8'))
>>>>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'<!DOCTYPE
>>>>> HTML PUBLIC "-//W3C//DTD HTML 3.2
>>>>> Final//EN">\n<title>Redirecting...</title>\n<h1>Redirecting...</h1>\n<p>You
>>>>> should be redirected automatically to target URL: <a href="/">/</a>.
>>>>> If not click the link.'
>>>>>
>>>>> ======================================================================
>>>>> FAIL: runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
>>>>> This function checks reset password functionality. (TestCase for
>>>>> Validating Valid_Email)
>>>>> ----------------------------------------------------------------------
>>>>> Traceback (most recent call last):
>>>>>   File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_reset_password.py",
>>>>> line 44, in runTest
>>>>>     'utf-8'))
>>>>> AssertionError: 'Recover pgAdmin 4 Password' not found in u'<!DOCTYPE
>>>>> HTML PUBLIC "-//W3C//DTD HTML 3.2
>>>>> Final//EN">\n<title>Redirecting...</title>\n<h1>Redirecting...</h1>\n<p>You
>>>>> should be redirected automatically to target URL: <a href="/">/</a>.
>>>>> If not click the link.'
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>> Ran 26 tests in 30.109s
>>>>>
>>>>> FAILED (failures=3)
>>>>>
>>>>> It's very far from obvious what's wrong here (/reset looks just fine
>>>>> to me). How can we get more useful info out of the framework?
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> VP, Chief Architect, Tools & Installers
>>>>> EnterpriseDB: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>
>>>>
>>>>
>>>> --
>>>> Thanks,
>>>> Navnath Gadakh
>>>> Software Engineer
>>>> EnterpriseDB Corporation
>>>> Mobile: +91 9975389878
>>>
>>>
>>>
>>> --
>>> Dave Page
>>> VP, Chief Architect, Tools & Installers
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>
>>
>>
>> --
>> Thanks,
>> Navnath Gadakh
>> Software Engineer
>> EnterpriseDB Corporation
>> Mobile: +91 9975389878
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake



--
Thanks,
Navnath Gadakh
Software Engineer
EnterpriseDB Corporation
Mobile: +91 9975389878


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pgAdmin IV : Unittest modular patch
Следующее
От: Dave Page
Дата:
Сообщение: Re: pgAdmin IV : Unittest modular patch