Обсуждение: Fwd: pgAdmin IV : Unittest modular patch
Вложения
Hi Dave,PFA patch for modular API test cases.Kindly, review the same and let me know for any modification.
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
On Fri, Jul 8, 2016 at 2:30 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote:Hi Dave,PFA patch for modular API test cases.Kindly, review the same and let me know for any modification.Please re-create the patch so that it doesn't revert various changes made to config.py etc. over the last couple of weeks.
What is the patch for? Is it fixing issues in Priyanka's last patch, or something else?This patch is for -1. Now we can run testsuite node/module wise(like for browser only, for databases only) OR for all nodes/modules2. I have modified the existing functionality for testsuite and all test case classes (Made all test cases independently runnable, removed the priority logic).
--Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
Вложения
Hi Dave,PFA updated patch for modular API test cases.On Mon, Jul 11, 2016 at 5:11 PM, Dave Page <dave.page@enterprisedb.com> wrote:On Fri, Jul 8, 2016 at 2:30 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote:Hi Dave,PFA patch for modular API test cases.Kindly, review the same and let me know for any modification.Please re-create the patch so that it doesn't revert various changes made to config.py etc. over the last couple of weeks.config.py file was not updated at my end, I have updated it in the current patch. I have also added code related to advance test data configuration which was created by Priyanka (Seprated the test data configuration files).What is the patch for? Is it fixing issues in Priyanka's last patch, or something else?This patch is for -1. Now we can run testsuite node/module wise(like for browser only, for databases only) OR for all nodes/modules2. I have modified the existing functionality for testsuite and all test case classes (Made all test cases independently runnable, removed the priority logic).
For more details please refer the file 'regression/README'.
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
Hi Dave,
Please find the revised patch for unit tests of pgAdmin4 APIs.
This patch includes-
test_advance_config.json(for user it’s test_advance_config.json.in) for advance test configuration for database/server(Priyanka was working on this)
test_config.json(for user it’s test_config_json.in) for basic credentials data for database/server
From now onward we can execute test cases node wise/package wise. I have slightly modified the way of running the testsuite. We used the command line arguments(pkg) which denotes for which package testsuite going to run.
Run the testsuite for all packages by following command
Python regression/testsuite.py --pkg all
Here, ‘all’ means for all python packages(i.e.browser,server_groups,server,
databases etc. which are same names in project directory structure)
This will find the ‘tests’ directory in each package & execute the test cases.
Run the testsuite for single package by following command
Python regression/testsuite.py --pkg browser (this execute the tests in ‘browser’ package only)
Python regression/testsuite.py --pkg browser.server_groups.servers.databases (this execute the tests in ‘databases’ package only)
4. Logger file. Which include the detailed output of the testsuite. Testsuite also prints the test summary on the console.
5. Previously, we set the priority to each test case. In this patch priority logic is removed as there is no need to set priority.
6. Resolution of AttributeError for attribute 'APP_ROOT'(Which is mentioned by you in a previous email)
Note: You might get ‘AttributeError’ while running this patch on Python 3.4 (I have raised this bug in RM(#1464)), But still you can run the testsuite. It will run on Python 2.7 without error.
HiOn Mon, Jul 11, 2016 at 2:16 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote:Hi Dave,PFA updated patch for modular API test cases.On Mon, Jul 11, 2016 at 5:11 PM, Dave Page <dave.page@enterprisedb.com> wrote:On Fri, Jul 8, 2016 at 2:30 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote:Hi Dave,PFA patch for modular API test cases.Kindly, review the same and let me know for any modification.Please re-create the patch so that it doesn't revert various changes made to config.py etc. over the last couple of weeks.config.py file was not updated at my end, I have updated it in the current patch. I have also added code related to advance test data configuration which was created by Priyanka (Seprated the test data configuration files).What is the patch for? Is it fixing issues in Priyanka's last patch, or something else?This patch is for -1. Now we can run testsuite node/module wise(like for browser only, for databases only) OR for all nodes/modules2. I have modified the existing functionality for testsuite and all test case classes (Made all test cases independently runnable, removed the priority logic).For more details please refer the file 'regression/README'.When running all tests, I get:......<Rule '//static/<filename>' (HEAD, OPTIONS, GET) -> redirects.static>,<Rule '/backup/<filename>' (HEAD, OPTIONS, GET) -> backup.static>,<Rule '/reset/<token>' (HEAD, POST, OPTIONS, GET) -> security.reset_password>,<Rule '/about/<filename>' (HEAD, OPTIONS, GET) -> about.static>])Traceback (most recent call last):File "regression/testsuite.py", line 151, in <module>suite = get_suite(args, test_client)File "regression/testsuite.py", line 75, in get_suiteTestsGeneratorRegistry.load_generators('pgadmin')File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line 56, in load_generatorsmodule = import_module(module_name)File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module__import__(name)File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_add.py", line 14, in <module>from regression import test_utils as utilsFile "/Users/dpage/git/pgadmin4/web/regression/test_utils.py", line 23, in <module>def get_ids(url=config.APP_ROOT + '/regression/parent_id.pkl'):AttributeError: 'module' object has no attribute 'APP_ROOT'That's not overly surprising, as we don't have an APP_ROOT setting in the config (nor should we - it should be calculated dynamically). Please fix, and remember to test your patches against a clean copy of the git tree in the future!Thanks!--Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
Вложения
Thanks - applied with some tweaks and changes, most notably: - "--pkg all" is the default if no command line options are given. - Output now goes in regression/regression.log - Terminal output is limited to WARNINGS from the app server. - The runner script is now python regression/runtests.py On Mon, Jul 18, 2016 at 1:45 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > Hi Dave, > > Please find the revised patch for unit tests of pgAdmin4 APIs. > > This patch includes- > > test_advance_config.json(for user it’s test_advance_config.json.in) for > advance test configuration for database/server(Priyanka was working on this) > > test_config.json(for user it’s test_config_json.in) for basic credentials > data for database/server > > From now onward we can execute test cases node wise/package wise. I have > slightly modified the way of running the testsuite. We used the command line > arguments(pkg) which denotes for which package testsuite going to run. > > > Run the testsuite for all packages by following command > > Python regression/testsuite.py --pkg all > > Here, ‘all’ means for all python > packages(i.e.browser,server_groups,server, > > databases etc. which are same names in project > directory structure) > > This will find the ‘tests’ directory in each package & > execute the test cases. > > > > Run the testsuite for single package by following command > > Python regression/testsuite.py --pkg browser (this execute the tests > in ‘browser’ package only) > > Python regression/testsuite.py --pkg > browser.server_groups.servers.databases (this execute the tests in > ‘databases’ package only) > > 4. Logger file. Which include the detailed output of the testsuite. > Testsuite also prints the test summary on the console. > > 5. Previously, we set the priority to each test case. In this patch > priority logic is removed as there is no need to set priority. > > 6. Resolution of AttributeError for attribute 'APP_ROOT'(Which is > mentioned by you in a previous email) > > > Note: You might get ‘AttributeError’ while running this patch on Python 3.4 > (I have raised this bug in RM(#1464)), But still you can run the testsuite. > It will run on Python 2.7 without error. > > > > On Fri, Jul 15, 2016 at 6:23 PM, Dave Page <dave.page@enterprisedb.com> > wrote: >> >> Hi >> >> On Mon, Jul 11, 2016 at 2:16 PM, Navnath Gadakh >> <navnath.gadakh@enterprisedb.com> wrote: >>> >>> Hi Dave, >>> PFA updated patch for modular API test cases. >>> >>> On Mon, Jul 11, 2016 at 5:11 PM, Dave Page <dave.page@enterprisedb.com> >>> wrote: >>>> >>>> >>>> >>>> On Fri, Jul 8, 2016 at 2:30 PM, Navnath Gadakh >>>> <navnath.gadakh@enterprisedb.com> wrote: >>>>> >>>>> >>>>> Hi Dave, >>>>> >>>>> PFA patch for modular API test cases. >>>>> >>>>> Kindly, review the same and let me know for any modification. >>>> >>>> >>>> Please re-create the patch so that it doesn't revert various changes >>>> made to config.py etc. over the last couple of weeks. >>> >>> >>> config.py file was not updated at my end, I have updated it in the >>> current patch. I have also added code related to advance test data >>> configuration which was created by Priyanka (Seprated the test data >>> configuration files). >>> >>>> >>>> What is the patch for? Is it fixing issues in Priyanka's last patch, or >>>> something else? >>>> This patch is for - >>>> 1. Now we can run testsuite node/module wise(like for browser only, for >>>> databases only) OR for all nodes/modules >>>> 2. I have modified the existing functionality for testsuite and all test >>>> case classes (Made all test cases independently runnable, removed the >>>> priority logic). >>> >>> >>> >>> For more details please refer the file 'regression/README'. >> >> >> When running all tests, I get: >> >> ... >> ... >> <Rule '//static/<filename>' (HEAD, OPTIONS, GET) -> redirects.static>, >> <Rule '/backup/<filename>' (HEAD, OPTIONS, GET) -> backup.static>, >> <Rule '/reset/<token>' (HEAD, POST, OPTIONS, GET) -> >> security.reset_password>, >> <Rule '/about/<filename>' (HEAD, OPTIONS, GET) -> about.static>]) >> Traceback (most recent call last): >> File "regression/testsuite.py", line 151, in <module> >> suite = get_suite(args, test_client) >> File "regression/testsuite.py", line 75, in get_suite >> TestsGeneratorRegistry.load_generators('pgadmin') >> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line 56, in >> load_generators >> module = import_module(module_name) >> File >> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", >> line 37, in import_module >> __import__(name) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_add.py", >> line 14, in <module> >> from regression import test_utils as utils >> File "/Users/dpage/git/pgadmin4/web/regression/test_utils.py", line 23, >> in <module> >> def get_ids(url=config.APP_ROOT + '/regression/parent_id.pkl'): >> AttributeError: 'module' object has no attribute 'APP_ROOT' >> >> That's not overly surprising, as we don't have an APP_ROOT setting in the >> config (nor should we - it should be calculated dynamically). Please fix, >> and remember to test your patches against a clean copy of the git tree in >> the future! >> >> Thanks! >> >> -- >> 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 - applied with some tweaks and changes, most notably:
- "--pkg all" is the default if no command line options are given.
- Output now goes in regression/regression.log
- Terminal output is limited to WARNINGS from the app server.
- The runner script is now python regression/runtests.py
On Mon, Jul 18, 2016 at 1:45 PM, Navnath GadakhSent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)<navnath.gadakh@enterprisedb.com> wrote:
> Hi Dave,
>
> Please find the revised patch for unit tests of pgAdmin4 APIs.
>
> This patch includes-
>
> test_advance_config.json(for user it’s test_advance_config.json.in) for
> advance test configuration for database/server(Priyanka was working on this)
>
> test_config.json(for user it’s test_config_json.in) for basic credentials
> data for database/server
>
> From now onward we can execute test cases node wise/package wise. I have
> slightly modified the way of running the testsuite. We used the command line
> arguments(pkg) which denotes for which package testsuite going to run.
>
>
> Run the testsuite for all packages by following command
>
> Python regression/testsuite.py --pkg all
>
> Here, ‘all’ means for all python
> packages(i.e.browser,server_groups,server,
>
> databases etc. which are same names in project
> directory structure)
>
> This will find the ‘tests’ directory in each package &
> execute the test cases.
>
>
>
> Run the testsuite for single package by following command
>
> Python regression/testsuite.py --pkg browser (this execute the tests
> in ‘browser’ package only)
>
> Python regression/testsuite.py --pkg
> browser.server_groups.servers.databases (this execute the tests in
> ‘databases’ package only)
>
> 4. Logger file. Which include the detailed output of the testsuite.
> Testsuite also prints the test summary on the console.
>
> 5. Previously, we set the priority to each test case. In this patch
> priority logic is removed as there is no need to set priority.
>
> 6. Resolution of AttributeError for attribute 'APP_ROOT'(Which is
> mentioned by you in a previous email)
>
>
> Note: You might get ‘AttributeError’ while running this patch on Python 3.4
> (I have raised this bug in RM(#1464)), But still you can run the testsuite.
> It will run on Python 2.7 without error.
>
>
>
> On Fri, Jul 15, 2016 at 6:23 PM, Dave Page <dave.page@enterprisedb.com>
> wrote:
>>
>> Hi
>>
>> On Mon, Jul 11, 2016 at 2:16 PM, Navnath Gadakh
>> <navnath.gadakh@enterprisedb.com> wrote:
>>>
>>> Hi Dave,
>>> PFA updated patch for modular API test cases.
>>>
>>> On Mon, Jul 11, 2016 at 5:11 PM, Dave Page <dave.page@enterprisedb.com>
>>> wrote:
>>>>
>>>>
>>>>
>>>> On Fri, Jul 8, 2016 at 2:30 PM, Navnath Gadakh
>>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>>>
>>>>>
>>>>> Hi Dave,
>>>>>
>>>>> PFA patch for modular API test cases.
>>>>>
>>>>> Kindly, review the same and let me know for any modification.
>>>>
>>>>
>>>> Please re-create the patch so that it doesn't revert various changes
>>>> made to config.py etc. over the last couple of weeks.
>>>
>>>
>>> config.py file was not updated at my end, I have updated it in the
>>> current patch. I have also added code related to advance test data
>>> configuration which was created by Priyanka (Seprated the test data
>>> configuration files).
>>>
>>>>
>>>> What is the patch for? Is it fixing issues in Priyanka's last patch, or
>>>> something else?
>>>> This patch is for -
>>>> 1. Now we can run testsuite node/module wise(like for browser only, for
>>>> databases only) OR for all nodes/modules
>>>> 2. I have modified the existing functionality for testsuite and all test
>>>> case classes (Made all test cases independently runnable, removed the
>>>> priority logic).
>>>
>>>
>>>
>>> For more details please refer the file 'regression/README'.
>>
>>
>> When running all tests, I get:
>>
>> ...
>> ...
>> <Rule '//static/<filename>' (HEAD, OPTIONS, GET) -> redirects.static>,
>> <Rule '/backup/<filename>' (HEAD, OPTIONS, GET) -> backup.static>,
>> <Rule '/reset/<token>' (HEAD, POST, OPTIONS, GET) ->
>> security.reset_password>,
>> <Rule '/about/<filename>' (HEAD, OPTIONS, GET) -> about.static>])
>> Traceback (most recent call last):
>> File "regression/testsuite.py", line 151, in <module>
>> suite = get_suite(args, test_client)
>> File "regression/testsuite.py", line 75, in get_suite
>> TestsGeneratorRegistry.load_generators('pgadmin')
>> File "/Users/dpage/git/pgadmin4/web/pgadmin/utils/route.py", line 56, in
>> load_generators
>> module = import_module(module_name)
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
>> line 37, in import_module
>> __import__(name)
>> File
>> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_add.py",
>> line 14, in <module>
>> from regression import test_utils as utils
>> File "/Users/dpage/git/pgadmin4/web/regression/test_utils.py", line 23,
>> in <module>
>> def get_ids(url=config.APP_ROOT + '/regression/parent_id.pkl'):
>> AttributeError: 'module' object has no attribute 'APP_ROOT'
>>
>> That's not overly surprising, as we don't have an APP_ROOT setting in the
>> config (nor should we - it should be calculated dynamically). Please fix,
>> and remember to test your patches against a clean copy of the git tree in
>> the future!
>>
>> Thanks!
>>
>> --
>> 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
--
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
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/’.
Вложения
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
HiOK in principle, but it doesn't seem to work:
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/’.
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
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
Вложения
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. 2) Is the test count in the summary correct when you have multiple servers? I think it might be resetting between servers. 3) Please ensure that test databases that are created are also dropped again. I'm getting tired of deleting them manually! 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
Ahh, that explains it. Nice catch! It's working in both server and
desktop modes now :-).
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
--Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
The Enterprise PostgreSQL Company
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. Sure. I will implement in the next patch. > > 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. > > 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, 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
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. > Sure. I will implement in the next patch. >> >> 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. >> 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
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
Hi On Mon, Aug 1, 2016 at 10:54 AM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > 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. Here's an extract from stdout (with the encoded password replaced with xxxxxx). I don't actually see the same in regression.log, but that may be because of the log settings I'm using - we should filter the same from there though to be safe: ... This function checks reset password functionality. (TestCase for Validating Valid_Email) ... send: 'ehlo piranha.ox.uk.enterprisedb.com\r\n' reply: '250-smtp.gmail.com at your service, [194.73.70.210]\r\n' reply: '250-SIZE 35882577\r\n' reply: '250-8BITMIME\r\n' reply: '250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\r\n' reply: '250-ENHANCEDSTATUSCODES\r\n' reply: '250-PIPELINING\r\n' reply: '250-CHUNKING\r\n' reply: '250 SMTPUTF8\r\n' reply: retcode (250); Msg: smtp.gmail.com at your service, [194.73.70.210] SIZE 35882577 8BITMIME AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8 send: 'AUTH PLAIN xxxxxx\r\n' reply: '235 2.7.0 Accepted\r\n' reply: retcode (235); Msg: 2.7.0 Accepted send: u'mail FROM:<no-reply@localhost> size=1122\r\n' reply: '250 2.1.0 OK v26sm44372678pfi.41 - gsmtp\r\n' reply: retcode (250); Msg: 2.1.0 OK v26sm44372678pfi.41 - gsmtp send: u'rcpt TO:<dpage@pgadmin.org>\r\n' reply: '250 2.1.5 OK v26sm44372678pfi.41 - gsmtp\r\n' reply: retcode (250); Msg: 2.1.5 OK v26sm44372678pfi.41 - gsmtp send: 'data\r\n' reply: '354 Go ahead v26sm44372678pfi.41 - gsmtp\r\n' reply: retcode (354); Msg: Go ahead v26sm44372678pfi.41 - gsmtp data: (354, 'Go ahead v26sm44372678pfi.41 - gsmtp') send: 'Content-Type: multipart/mixed; boundary="===============5947340609837468105=="\r\nMIME-Version: 1.0\r\nSubject: Password reset instructions for pgAdmin 4\r\nFrom: no-reply@localhost\r\nTo: dpage@pgadmin.org\r\nDate: Mon, 01 Aug 2016 11:18:01 +0100\r\nMessage-ID: <20160801101758.1954.48817@piranha.ox.uk.enterprisedb.com>\r\n\r\n--===============5947340609837468105==\r\nContent-Type: multipart/alternative;\r\n boundary="===============4573645557236154244=="\r\nMIME-Version: 1.0\r\n\r\n--===============4573645557236154244==\r\nContent-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\nClick the link below to reset your password:\r\n\r\nhttp://localhost/reset/WyIxIiwiYTY2ODY0ZTY0NzlmMzM1NTNhYTc0NzUwYzEwNDc5ZmQiXQ.CoCzVg.FE0MhiGBwOgVWTcX8mB3Xgq54yw\r\n--===============4573645557236154244==\r\nContent-Type: text/html; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\n<p><a href="http://localhost/reset/WyIxIiwiYTY2ODY0ZTY0NzlmMzM1NTNhYTc0NzUwYzEwNDc5ZmQiXQ.CoCzVg.FE0MhiGBwOgVWTcX8mB3Xgq54yw">Click here to reset your password</a></p>\r\n--===============4573645557236154244==--\r\n\r\n--===============5947340609837468105==--\r\n.\r\n' reply: '250 2.0.0 OK 1470046685 v26sm44372678pfi.41 - gsmtp\r\n' reply: retcode (250); Msg: 2.0.0 OK 1470046685 v26sm44372678pfi.41 - gsmtp data: (250, '2.0.0 OK 1470046685 v26sm44372678pfi.41 - gsmtp') send: 'quit\r\n' reply: '221 2.0.0 closing connection v26sm44372678pfi.41 - gsmtp\r\n' reply: retcode (221); Msg: 2.0.0 closing connection v26sm44372678pfi.41 - gsmtp ok runTest (pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase) ... These are the relevant settings I'm using: # Debug mode DEBUG = True # App mode SERVER_MODE = True # Log CONSOLE_LOG_LEVEL = DEBUG FILE_LOG_LEVEL = DEBUG # Mail server settings MAIL_SERVER = 'smtp.gmail.com' MAIL_PORT = 465 MAIL_USE_SSL = True MAIL_USERNAME = 'dave.page@enterprisedb.com' MAIL_PASSWORD = 'xxxxxx' >>>> >>>> 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 -- Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake
Please find the attached patch.
This patch includes:
1. API test cases for Roles & Tablespaces node(Completed nodes: server groups, servers, databases)
You can run test-suite using following command
for roles node
python regression/runtests.py --pkg browser.server_groups.servers.roles
for tablespaces node
python regression/runtests.py --pkg browser.server_groups.servers.tablespaces
for all nodes
python regression/runtests.py
You can also test with multiple servers.
2. Delete database code in some of the missed test files.
3. Added advanced configurations in test_advanced_config.json.in for roles & tablespaces. So, accordingly you need change the file test_advanced_config.json
4. Added one test user credentials in test_config.json.in to test the ‘valid password’ test case which is present in browser/tests/test_change_password.py
Why test user credentials in test_config.json.in?
Currently, I am getting ‘UnicodeDecodeError’ when I run test-suite(runtests.py) with existing code. I already explained the detail about this error in RM(#1521). I am creating test user to test the ‘valid password’ test case.
Notes:
1. Code not added to encode the password which is displaying in log file while testing SMTP(Will add the code in next patch)
2. Code not added to show enhanced the test summary report(that you mentioned in the previous email). I will look into this, need to decide approach what are the code changes required in the current code.
Hi
On Mon, Aug 1, 2016 at 10:54 AM, Navnath Gadakh
<navnath.gadakh@enterprisedb.com> wrote:
> 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.
Here's an extract from stdout (with the encoded password replaced with
xxxxxx). I don't actually see the same in regression.log, but that may
be because of the log settings I'm using - we should filter the same
from there though to be safe:
...
This function checks reset password functionality. (TestCase for
Validating Valid_Email) ... send: 'ehlo
piranha.ox.uk.enterprisedb.com\r\n'
reply: '250-smtp.gmail.com at your service, [194.73.70.210]\r\n'
reply: '250-SIZE 35882577\r\n'
reply: '250-8BITMIME\r\n'
reply: '250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\r\n'
reply: '250-ENHANCEDSTATUSCODES\r\n'
reply: '250-PIPELINING\r\n'
reply: '250-CHUNKING\r\n'
reply: '250 SMTPUTF8\r\n'
reply: retcode (250); Msg: smtp.gmail.com at your service, [194.73.70.210]
SIZE 35882577
8BITMIME
AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
ENHANCEDSTATUSCODES
PIPELINING
CHUNKING
SMTPUTF8
send: 'AUTH PLAIN xxxxxx\r\n'
reply: '235 2.7.0 Accepted\r\n'
reply: retcode (235); Msg: 2.7.0 Accepted
send: u'mail FROM:<no-reply@localhost> size=1122\r\n'
reply: '250 2.1.0 OK v26sm44372678pfi.41 - gsmtp\r\n'
reply: retcode (250); Msg: 2.1.0 OK v26sm44372678pfi.41 - gsmtp
send: u'rcpt TO:<dpage@pgadmin.org>\r\n'
reply: '250 2.1.5 OK v26sm44372678pfi.41 - gsmtp\r\n'
reply: retcode (250); Msg: 2.1.5 OK v26sm44372678pfi.41 - gsmtp
send: 'data\r\n'
reply: '354 Go ahead v26sm44372678pfi.41 - gsmtp\r\n'
reply: retcode (354); Msg: Go ahead v26sm44372678pfi.41 - gsmtp
data: (354, 'Go ahead v26sm44372678pfi.41 - gsmtp')
send: 'Content-Type: multipart/mixed;
boundary="===============5947340609837468105=="\r\nMIME-Version:
1.0\r\nSubject: Password reset instructions for pgAdmin 4\r\nFrom:
no-reply@localhost\r\nTo: dpage@pgadmin.org\r\nDate: Mon, 01 Aug 2016
11:18:01 +0100\r\nMessage-ID:
<20160801101758.1954.48817@piranha.ox.uk.enterprisedb.com>\r\n\r\n--===============5947340609837468105==\r\nContent-Type:
multipart/alternative;\r\n
boundary="===============4573645557236154244=="\r\nMIME-Version:
1.0\r\n\r\n--===============4573645557236154244==\r\nContent-Type:
text/plain; charset="utf-8"\r\nMIME-Version:
1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\nClick the link below to
reset your password:\r\n\r\nhttp://localhost/reset/WyIxIiwiYTY2ODY0ZTY0NzlmMzM1NTNhYTc0NzUwYzEwNDc5ZmQiXQ.CoCzVg.FE0MhiGBwOgVWTcX8mB3Xgq54yw\r\n--===============4573645557236154244==\r\nContent-Type:
text/html; charset="utf-8"\r\nMIME-Version:
1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\n<p><a
href="http://localhost/reset/WyIxIiwiYTY2ODY0ZTY0NzlmMzM1NTNhYTc0NzUwYzEwNDc5ZmQiXQ.CoCzVg.FE0MhiGBwOgVWTcX8mB3Xgq54yw">Click
here to reset your
password</a></p>\r\n--===============4573645557236154244==--\r\n\r\n--===============5947340609837468105==--\r\n.\r\n'
reply: '250 2.0.0 OK 1470046685 v26sm44372678pfi.41 - gsmtp\r\n'
reply: retcode (250); Msg: 2.0.0 OK 1470046685 v26sm44372678pfi.41 - gsmtp
data: (250, '2.0.0 OK 1470046685 v26sm44372678pfi.41 - gsmtp')
send: 'quit\r\n'
reply: '221 2.0.0 closing connection v26sm44372678pfi.41 - gsmtp\r\n'
reply: retcode (221); Msg: 2.0.0 closing connection v26sm44372678pfi.41 - gsmtp
ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
...
These are the relevant settings I'm using:
# Debug mode
DEBUG = True
# App mode
SERVER_MODE = True
# Log
CONSOLE_LOG_LEVEL = DEBUG
FILE_LOG_LEVEL = DEBUG
# Mail server settings
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USERNAME = 'dave.page@enterprisedb.com'
MAIL_PASSWORD = 'xxxxxx'
>>>>
>>>> 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
--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
Вложения
Hi Navnath On Tue, Aug 2, 2016 at 3:58 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > Hi Dave, > Please find the attached patch. > This patch includes: > 1. API test cases for Roles & Tablespaces node(Completed nodes: server > groups, servers, databases) > You can run test-suite using following command > for roles node > python regression/runtests.py --pkg > browser.server_groups.servers.roles > for tablespaces node > python regression/runtests.py --pkg > browser.server_groups.servers.tablespaces > for all nodes > python regression/runtests.py > You can also test with multiple servers. > 2. Delete database code in some of the missed test files. > 3. Added advanced configurations in test_advanced_config.json.in for roles & > tablespaces. So, accordingly you need change the file > test_advanced_config.json > 4. Added one test user credentials in test_config.json.in to test the ‘valid > password’ test case which is present in > browser/tests/test_change_password.py > Why test user credentials in test_config.json.in? > Currently, I am getting ‘UnicodeDecodeError’ when I run > test-suite(runtests.py) with existing code. I already explained the detail > about this error in RM(#1521). I am creating test user to test the ‘valid > password’ test case. The tablespace test is one that I think is going to cause us problems - we really can't have a hard-coded path in the config; - It might need to be different for each server being tested - It is very likely to be different for each user I think what we need to do is: - Skip the tests if the server is not connected via a Unix domain socket (hostname starts with /), 127.0.0.1 or ::1. - Add per-server configuration options for the tablespace path and service account under which the database server runs. These values should default to /tmp and postgres for a PostgreSQL server, and edb for PPAS. - Otherwise; assume the server is on the local machine, and: - Create /$tblspace_path/<random_string>/ - chown $service_account /$tblspace_path/<random_string>/ - Run the tests Thoughts? I'd also suggest another couple of changes: - Remove the test_ prefix from the values in the config files. It doesn't really help in the code as there you'll always have the data in a variable anyway, e.g. adv_config_data["spc_location"] instead of adv_config_data["test_spc_location"]. - I think we should fall back to using test_advanced_config.json.in if the user hasn't made their own copy, e.g. try: with open(CURRENT_PATH + '/test_advanced_config.json') as data_file: advanced_config_data = json.load(data_file) except: with open(CURRENT_PATH + '/test_advanced_config.json.in') as data_file: advanced_config_data = json.load(data_file) -- Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake
Hi Navnath
On Tue, Aug 2, 2016 at 3:58 PM, Navnath Gadakh
<navnath.gadakh@enterprisedb.com> wrote:
> Hi Dave,The tablespace test is one that I think is going to cause us problems> Please find the attached patch.
> This patch includes:
> 1. API test cases for Roles & Tablespaces node(Completed nodes: server
> groups, servers, databases)
> You can run test-suite using following command
> for roles node
> python regression/runtests.py --pkg
> browser.server_groups.servers.roles
> for tablespaces node
> python regression/runtests.py --pkg
> browser.server_groups.servers.tablespaces
> for all nodes
> python regression/runtests.py
> You can also test with multiple servers.
> 2. Delete database code in some of the missed test files.
> 3. Added advanced configurations in test_advanced_config.json.in for roles &
> tablespaces. So, accordingly you need change the file
> test_advanced_config.json
> 4. Added one test user credentials in test_config.json.in to test the ‘valid
> password’ test case which is present in
> browser/tests/test_change_password.py
> Why test user credentials in test_config.json.in?
> Currently, I am getting ‘UnicodeDecodeError’ when I run
> test-suite(runtests.py) with existing code. I already explained the detail
> about this error in RM(#1521). I am creating test user to test the ‘valid
> password’ test case.
- we really can't have a hard-coded path in the config;
- It might need to be different for each server being tested
Current patch supports multiple servers if you add tablespace configurations for multiple servers. In the current patch, it's only for one server.
- It is very likely to be different for each user
I think what we need to do is:
- Skip the tests if the server is not connected via a Unix domain
socket (hostname starts with /), 127.0.0.1 or ::1.
- Add per-server configuration options for the tablespace path and
service account under which the database server runs. These values
should default to /tmp and postgres for a PostgreSQL server, and edb
for PPAS.
- Otherwise; assume the server is on the local machine, and:
- Create /$tblspace_path/<random_string>/
- chown $service_account /$tblspace_path/<random_string>/
- Run the tests
Thoughts?
I'd also suggest another couple of changes:
- Remove the test_ prefix from the values in the config files. It
doesn't really help in the code as there you'll always have the data
in a variable anyway, e.g. adv_config_data["spc_location"] instead of
adv_config_data["test_spc_location"].
- I think we should fall back to using test_advanced_config.json.in if
the user hasn't made their own copy, e.g.
try:
with open(CURRENT_PATH + '/test_advanced_config.json') as data_file:
advanced_config_data = json.load(data_file)
except:
with open(CURRENT_PATH + '/test_advanced_config.json.in') as data_file:
advanced_config_data = json.load(data_file)
--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
On Wed, Aug 3, 2016 at 2:01 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > Hi Dave, > Thanks for clarification. > > On Wed, Aug 3, 2016 at 2:45 PM, Dave Page <dave.page@enterprisedb.com> > wrote: >> >> Hi Navnath >> >> On Tue, Aug 2, 2016 at 3:58 PM, Navnath Gadakh >> <navnath.gadakh@enterprisedb.com> wrote: >> > Hi Dave, >> > Please find the attached patch. >> > This patch includes: >> > 1. API test cases for Roles & Tablespaces node(Completed nodes: server >> > groups, servers, databases) >> > You can run test-suite using following command >> > for roles node >> > python regression/runtests.py --pkg >> > browser.server_groups.servers.roles >> > for tablespaces node >> > python regression/runtests.py --pkg >> > browser.server_groups.servers.tablespaces >> > for all nodes >> > python regression/runtests.py >> > You can also test with multiple servers. >> > 2. Delete database code in some of the missed test files. >> > 3. Added advanced configurations in test_advanced_config.json.in for >> > roles & >> > tablespaces. So, accordingly you need change the file >> > test_advanced_config.json >> > 4. Added one test user credentials in test_config.json.in to test the >> > ‘valid >> > password’ test case which is present in >> > browser/tests/test_change_password.py >> > Why test user credentials in test_config.json.in? >> > Currently, I am getting ‘UnicodeDecodeError’ when I run >> > test-suite(runtests.py) with existing code. I already explained the >> > detail >> > about this error in RM(#1521). I am creating test user to test the >> > ‘valid >> > password’ test case. >> >> The tablespace test is one that I think is going to cause us problems >> - we really can't have a hard-coded path in the config; > > Understood. >> >> >> - It might need to be different for each server being tested >> Current patch supports multiple servers if you add tablespace >> configurations for multiple servers. In the current patch, it's only for one >> server. > > For multiple servers you need to add multiple tablespace > configuration: > "test_tablespc_credentials":[{ > "test_tblspace_name": "test_tablespace", > "test_spc_location": "/Library/PostgreSQL/9.6/data", > "test_spc_opts": [], > "test_spc_user": "XXXXX" > }, > "test_tblspace_name": "test_tablespace1", > "test_spc_seclable": [], > "test_spc_location": "/Library/PostgrePlus/9.4AS/data", > "test_spc_opts": [], > "test_spc_user": "YYYYY" > }] > Anyhow, we are not going to use a hard coded path. Oh - does the per-server config override the main config? That's useful. So anything that's in test_advanced_config.py can be overridden on a per-server basis in test_config.py? >> - It is very likely to be different for each user >> >> I think what we need to do is: >> >> - Skip the tests if the server is not connected via a Unix domain >> socket (hostname starts with /), 127.0.0.1 or ::1. > > Understood. Please output a notice saying the test was skipped, and note it in the summary as well (as we're planning to do with failed tests). >> >> - Add per-server configuration options for the tablespace path and >> service account under which the database server runs. These values >> should default to /tmp and postgres for a PostgreSQL server, and edb >> for PPAS. > > Ok. For server connected via Unix domain socket. As per my understanding > modified configuration should be, > "tablespc_credentials":[{ > "tblspace_name": "tablespace1", > "testspc_seclable": [], > "spc_acl": [ > { > "grantee":"postgres", > "grantor":"postgres", > "privileges":[ > { > "privilege_type":"C", > "privilege":true, > "with_grant":false > } > ] > } > ], > "spc_location": "/tmp", > "spc_opts": [], > "spc_user": "postgres", > "service_account": "test1_user" > },{ > "tblspace_name": "tablespace2", > "spc_seclable": [], > "spc_acl": [ > { > "grantee":"enterprisedb", > "grantor":"enterprisedb", > "privileges":[ > { > "privilege_type":"C", > "privilege":true, > "with_grant":false > } > ] > } > ], > "spc_location": "/tmp", > "spc_opts": [], > "spc_user": "enterprisedb", > "service_account": "test2_user" > }] > Please correct me if I am wrong. Something like that yes - though service_account seems pointless given your comment below... >> - Otherwise; assume the server is on the local machine, and: >> - Create /$tblspace_path/<random_string>/ >> - chown $service_account /$tblspace_path/<random_string>/ >> - Run the tests > > We can't set the owner for a tablespace path directory using normal > user, the user should be 'root' > Say, I am logged in my machine as a 'abc' user & I have installed > PostgreSQL9.5 with 'postgres' user. > It won't run chown postgres > /$tablespace_path_for_PostgreSQL9.5/<random_string> Aww crap. Yeah :-(. OK in that case let's have the user specify (and create) the path themselves for each server. If they don't specify a path, then skip the test. In fact - you might as well only skip the test in that case, and forget about the address check above. -- Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake
On Wed, Aug 3, 2016 at 2:01 PM, Navnath GadakhOh - does the per-server config override the main config? That's<navnath.gadakh@enterprisedb.com> wrote:
> Hi Dave,
> Thanks for clarification.
>
> On Wed, Aug 3, 2016 at 2:45 PM, Dave Page <dave.page@enterprisedb.com>
> wrote:
>>
>> Hi Navnath
>>
>> On Tue, Aug 2, 2016 at 3:58 PM, Navnath Gadakh
>> <navnath.gadakh@enterprisedb.com> wrote:
>> > Hi Dave,
>> > Please find the attached patch.
>> > This patch includes:
>> > 1. API test cases for Roles & Tablespaces node(Completed nodes: server
>> > groups, servers, databases)
>> > You can run test-suite using following command
>> > for roles node
>> > python regression/runtests.py --pkg
>> > browser.server_groups.servers.roles
>> > for tablespaces node
>> > python regression/runtests.py --pkg
>> > browser.server_groups.servers.tablespaces
>> > for all nodes
>> > python regression/runtests.py
>> > You can also test with multiple servers.
>> > 2. Delete database code in some of the missed test files.
>> > 3. Added advanced configurations in test_advanced_config.json.in for
>> > roles &
>> > tablespaces. So, accordingly you need change the file
>> > test_advanced_config.json
>> > 4. Added one test user credentials in test_config.json.in to test the
>> > ‘valid
>> > password’ test case which is present in
>> > browser/tests/test_change_password.py
>> > Why test user credentials in test_config.json.in?
>> > Currently, I am getting ‘UnicodeDecodeError’ when I run
>> > test-suite(runtests.py) with existing code. I already explained the
>> > detail
>> > about this error in RM(#1521). I am creating test user to test the
>> > ‘valid
>> > password’ test case.
>>
>> The tablespace test is one that I think is going to cause us problems
>> - we really can't have a hard-coded path in the config;
>
> Understood.
>>
>>
>> - It might need to be different for each server being tested
>> Current patch supports multiple servers if you add tablespace
>> configurations for multiple servers. In the current patch, it's only for one
>> server.
>
> For multiple servers you need to add multiple tablespace
> configuration:
> "test_tablespc_credentials":[{
> "test_tblspace_name": "test_tablespace",
> "test_spc_location": "/Library/PostgreSQL/9.6/data",
> "test_spc_opts": [],
> "test_spc_user": "XXXXX"
> },
> "test_tblspace_name": "test_tablespace1",
> "test_spc_seclable": [],
> "test_spc_location": "/Library/PostgrePlus/9.4AS/data",
> "test_spc_opts": [],
> "test_spc_user": "YYYYY"
> }]
> Anyhow, we are not going to use a hard coded path.
useful. So anything that's in test_advanced_config.py can be
overridden on a per-server basis in test_config.py?
>> - It is very likely to be different for each user
>>
>> I think what we need to do is:
>>
>> - Skip the tests if the server is not connected via a Unix domain
>> socket (hostname starts with /), 127.0.0.1 or ::1.
>
> Understood.
Please output a notice saying the test was skipped, and note it in the
summary as well (as we're planning to do with failed tests).Something like that yes - though service_account seems pointless given
>>
>> - Add per-server configuration options for the tablespace path and
>> service account under which the database server runs. These values
>> should default to /tmp and postgres for a PostgreSQL server, and edb
>> for PPAS.
>
> Ok. For server connected via Unix domain socket. As per my understanding
> modified configuration should be,
> "tablespc_credentials":[{
> "tblspace_name": "tablespace1",
> "testspc_seclable": [],
> "spc_acl": [
> {
> "grantee":"postgres",
> "grantor":"postgres",
> "privileges":[
> {
> "privilege_type":"C",
> "privilege":true,
> "with_grant":false
> }
> ]
> }
> ],
> "spc_location": "/tmp",
> "spc_opts": [],
> "spc_user": "postgres",
> "service_account": "test1_user"
> },{
> "tblspace_name": "tablespace2",
> "spc_seclable": [],
> "spc_acl": [
> {
> "grantee":"enterprisedb",
> "grantor":"enterprisedb",
> "privileges":[
> {
> "privilege_type":"C",
> "privilege":true,
> "with_grant":false
> }
> ]
> }
> ],
> "spc_location": "/tmp",
> "spc_opts": [],
> "spc_user": "enterprisedb",
> "service_account": "test2_user"
> }]
> Please correct me if I am wrong.
your comment below...
>> - Otherwise; assume the server is on the local machine, and:
>> - Create /$tblspace_path/<random_string>/
>> - chown $service_account /$tblspace_path/<random_string>/
>> - Run the tests
>
> We can't set the owner for a tablespace path directory using normal
> user, the user should be 'root'
> Say, I am logged in my machine as a 'abc' user & I have installed
> PostgreSQL9.5 with 'postgres' user.
> It won't run chown postgres
> /$tablespace_path_for_PostgreSQL9.5/<random_string>
Aww crap. Yeah :-(. OK in that case let's have the user specify (and
create) the path themselves for each server. If they don't specify a
path, then skip the test.
In fact - you might as well only skip the test in that case, and
forget about the address check above.
--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
Hi On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: >> Oh - does the per-server config override the main config? That's >> useful. So anything that's in test_advanced_config.py can be >> overridden on a per-server basis in test_config.py? > > No. > per-server i.e advance config(test_advanced_config.json.in) and main > config(test_config.json) both are different files. In main config we just > mention the server’s credentials.(We can also mention per server > credentails) and in test_advanced_config.json.in(here we say per-server > config) > we mention the advanced configurations i.e. test data for each node. OK. > So, let's summarize the discussion: > - Let user specify the tablespace path in test_advanced_config.json.in No - test_config.py. It should be per-server. > - If path not specified in the test_advanced_config.json.in skip the > test cases for tablespace. Yes (but, test_config.py), for that server only. > - Output a notice saying the test was skipped, and note it in the > summary. Yes. > - No need to check the address.(Unix domain socket). It seems correct > way. Right. Thanks! -- Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake
Hi
On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh
<navnath.gadakh@enterprisedb.com> wrote:
>> Oh - does the per-server config override the main config? That's
>> useful. So anything that's in test_advanced_config.py can be
>> overridden on a per-server basis in test_config.py?
>
> No.
> per-server i.e advance config(test_advanced_config.json.in) and main
> config(test_config.json) both are different files. In main config we just
> mention the server’s credentials.(We can also mention per server
> credentails) and in test_advanced_config.json.in(here we say per-server
> config)
> we mention the advanced configurations i.e. test data for each node.
OK.
> So, let's summarize the discussion:
> - Let user specify the tablespace path in test_advanced_config.json.in
No - test_config.py. It should be per-server.
> - If path not specified in the test_advanced_config.json.in skip the
> test cases for tablespace.
Yes (but, test_config.py), for that server only.
> - Output a notice saying the test was skipped, and note it in the
> summary.
Yes.
> - No need to check the address.(Unix domain socket). It seems correct
> way.
Right.
Thanks!
--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > Hi Dave, > > On Thu, Aug 4, 2016 at 4:04 PM, Dave Page <dave.page@enterprisedb.com> > wrote: >> >> Hi >> >> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh >> <navnath.gadakh@enterprisedb.com> wrote: >> >> >> Oh - does the per-server config override the main config? That's >> >> useful. So anything that's in test_advanced_config.py can be >> >> overridden on a per-server basis in test_config.py? >> > >> > No. >> > per-server i.e advance config(test_advanced_config.json.in) and main >> > config(test_config.json) both are different files. In main config we >> > just >> > mention the server’s credentials.(We can also mention per server >> > credentails) and in test_advanced_config.json.in(here we say per-server >> > config) >> > we mention the advanced configurations i.e. test data for each node. >> >> OK. >> >> > So, let's summarize the discussion: >> > - Let user specify the tablespace path in >> > test_advanced_config.json.in >> >> No - test_config.py. It should be per-server. > > We don't have a file named 'test_config.py' but we have a server's > credential file named 'test_config.json'. > So, you are saying the tablespace path to be added in > 'test_config.json'. > Am I correct? Yeah, sorry. It should be a property of the server configuration. -- Dave Page VP, Chief Architect, Tools & Installers EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company Blog: http://pgsnake.blogspot.com Twitter: @pgsnake
Yeah, sorry. It should be a property of the server configuration.On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh
<navnath.gadakh@enterprisedb.com> wrote:
> Hi Dave,
>
> On Thu, Aug 4, 2016 at 4:04 PM, Dave Page <dave.page@enterprisedb.com>
> wrote:
>>
>> Hi
>>
>> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh
>> <navnath.gadakh@enterprisedb.com> wrote:
>>
>> >> Oh - does the per-server config override the main config? That's
>> >> useful. So anything that's in test_advanced_config.py can be
>> >> overridden on a per-server basis in test_config.py?
>> >
>> > No.
>> > per-server i.e advance config(test_advanced_config.json.in) and main
>> > config(test_config.json) both are different files. In main config we
>> > just
>> > mention the server’s credentials.(We can also mention per server
>> > credentails) and in test_advanced_config.json.in(here we say per-server
>> > config)
>> > we mention the advanced configurations i.e. test data for each node.
>>
>> OK.
>>
>> > So, let's summarize the discussion:
>> > - Let user specify the tablespace path in
>> > test_advanced_config.json.in
>>
>> No - test_config.py. It should be per-server.
>
> We don't have a file named 'test_config.py' but we have a server's
> credential file named 'test_config.json'.
> So, you are saying the tablespace path to be added in
> 'test_config.json'.
> Am I correct?
--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
Вложения
Hi I guess you need to test if tablespace_path is omitted, not just empty? This function test the add tablespace scenario (Check Tablespace Node) ... ERROR ====================================================================== ERROR: setUpClass (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_put.py", line 48, in setUpClass cls.server_group, cls.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 122, in add_table_space data = get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] = server_config['tablespace_path'] KeyError: 'tablespace_path' ====================================================================== ERROR: setUpClass (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_delete.py", line 46, in setUpClass cls.server_group, cls.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 122, in add_table_space data = get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] = server_config['tablespace_path'] KeyError: 'tablespace_path' ====================================================================== ERROR: setUpClass (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_get.py", line 45, in setUpClass cls.server_group, cls.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 122, in add_table_space data = get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] = server_config['tablespace_path'] KeyError: 'tablespace_path' ====================================================================== ERROR: runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase) This function test the add tablespace scenario (Check Tablespace Node) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_add.py", line 47, in runTest self.server_ids) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 122, in add_table_space data = get_tablespace_data(server_connect) File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", line 41, in get_tablespace_data config_test_data['spc_location'] = server_config['tablespace_path'] KeyError: 'tablespace_path' ---------------------------------------------------------------------- Ran 14 tests in 9.326s FAILED (errors=4) On Mon, Aug 8, 2016 at 3:07 PM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > Hi Dave, > Please find the updated patch for API unit test cases for Roles and > Tablespaces nodes > As we finalized > Now, > 1. The user will specify the tablespace path in test_config.json.in > 2. If tablespace path not found, skip the test cases for that > server(Only tablespace test cases) > 3. Add the skipped test summary in the test result. (Now it's showing on > console + in log file, but need to update in a final enhanced test summary > report. Which is research point we will work on that after finishing all > nodes API test cases) > 4. Removed the test_ prefix from the values in the config files. > > Thanks! > > > On Thu, Aug 4, 2016 at 5:55 PM, Dave Page <dave.page@enterprisedb.com> > wrote: >> >> On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh >> <navnath.gadakh@enterprisedb.com> wrote: >> > Hi Dave, >> > >> > On Thu, Aug 4, 2016 at 4:04 PM, Dave Page <dave.page@enterprisedb.com> >> > wrote: >> >> >> >> Hi >> >> >> >> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh >> >> <navnath.gadakh@enterprisedb.com> wrote: >> >> >> >> >> Oh - does the per-server config override the main config? That's >> >> >> useful. So anything that's in test_advanced_config.py can be >> >> >> overridden on a per-server basis in test_config.py? >> >> > >> >> > No. >> >> > per-server i.e advance config(test_advanced_config.json.in) and >> >> > main >> >> > config(test_config.json) both are different files. In main config we >> >> > just >> >> > mention the server’s credentials.(We can also mention per server >> >> > credentails) and in test_advanced_config.json.in(here we say >> >> > per-server >> >> > config) >> >> > we mention the advanced configurations i.e. test data for each node. >> >> >> >> OK. >> >> >> >> > So, let's summarize the discussion: >> >> > - Let user specify the tablespace path in >> >> > test_advanced_config.json.in >> >> >> >> No - test_config.py. It should be per-server. >> > >> > We don't have a file named 'test_config.py' but we have a server's >> > credential file named 'test_config.json'. >> > So, you are saying the tablespace path to be added in >> > 'test_config.json'. >> > Am I correct? >> >> Yeah, sorry. It should be a property of the server configuration. >> >> >> -- >> 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
Hi
I guess you need to test if tablespace_path is omitted, not just empty?
This function test the add tablespace scenario (Check Tablespace Node) ... ERROR
============================================================ ==========
ERROR: setUpClass
(pgadmin.browser.server_groups.servers.tablespaces.tests. test_tbspc_put.TableSpaceUpdat eTestCase)
------------------------------------------------------------ ----------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ test_tbspc_put.py",
line 48, in setUpClass
cls.server_group, cls.server_ids)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 122, in add_table_space
data = get_tablespace_data(server_connect)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 41, in get_tablespace_data
config_test_data['spc_location'] = server_config['tablespace_path ']
KeyError: 'tablespace_path'
============================================================ ==========
ERROR: setUpClass
(pgadmin.browser.server_groups.servers.tablespaces.tests. test_tbspc_delete.TableSpaceDe leteTestCase)
------------------------------------------------------------ ----------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ test_tbspc_delete.py",
line 46, in setUpClass
cls.server_group, cls.server_ids)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 122, in add_table_space
data = get_tablespace_data(server_connect)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 41, in get_tablespace_data
config_test_data['spc_location'] = server_config['tablespace_path ']
KeyError: 'tablespace_path'
============================================================ ==========
ERROR: setUpClass
(pgadmin.browser.server_groups.servers.tablespaces.tests. test_tbspc_get.TablespaceGetTe stCase)
------------------------------------------------------------ ----------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ test_tbspc_get.py",
line 45, in setUpClass
cls.server_group, cls.server_ids)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 122, in add_table_space
data = get_tablespace_data(server_connect)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 41, in get_tablespace_data
config_test_data['spc_location'] = server_config['tablespace_path ']
KeyError: 'tablespace_path'
============================================================ ==========
ERROR: runTest (pgadmin.browser.server_groups.servers.tablespaces.tests. test_tbspc_add.TableSpaceAddTe stCase)
This function test the add tablespace scenario (Check Tablespace Node)
------------------------------------------------------------ ----------
Traceback (most recent call last):
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ test_tbspc_add.py",
line 47, in runTest
self.server_ids)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 122, in add_table_space
data = get_tablespace_data(server_connect)
File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups /servers/tablespaces/tests/ utils.py",
line 41, in get_tablespace_data
config_test_data['spc_location'] = server_config['tablespace_path ']
KeyError: 'tablespace_path'
------------------------------------------------------------ ----------
Ran 14 tests in 9.326s
FAILED (errors=4)
On Mon, Aug 8, 2016 at 3:07 PM, Navnath Gadakh<navnath.gadakh@enterprisedb.com> wrote:
> Hi Dave,
> Please find the updated patch for API unit test cases for Roles and
> Tablespaces nodes
> As we finalized
> Now,
> 1. The user will specify the tablespace path in test_config.json.in
> 2. If tablespace path not found, skip the test cases for that
> server(Only tablespace test cases)
> 3. Add the skipped test summary in the test result. (Now it's showing on
> console + in log file, but need to update in a final enhanced test summary
> report. Which is research point we will work on that after finishing all
> nodes API test cases)
> 4. Removed the test_ prefix from the values in the config files.
>
> Thanks!
>
>
> On Thu, Aug 4, 2016 at 5:55 PM, Dave Page <dave.page@enterprisedb.com>
> wrote:
>>
>> On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh
>> <navnath.gadakh@enterprisedb.com> wrote:
>> > Hi Dave,
>> >
>> > On Thu, Aug 4, 2016 at 4:04 PM, Dave Page <dave.page@enterprisedb.com>
>> > wrote:
>> >>
>> >> Hi
>> >>
>> >> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh
>> >> <navnath.gadakh@enterprisedb.com> wrote:
>> >>
>> >> >> Oh - does the per-server config override the main config? That's
>> >> >> useful. So anything that's in test_advanced_config.py can be
>> >> >> overridden on a per-server basis in test_config.py?
>> >> >
>> >> > No.
>> >> > per-server i.e advance config(test_advanced_config.json.in) and
>> >> > main
>> >> > config(test_config.json) both are different files. In main config we
>> >> > just
>> >> > mention the server’s credentials.(We can also mention per server
>> >> > credentails) and in test_advanced_config.json.in(here we say
>> >> > per-server
>> >> > config)
>> >> > we mention the advanced configurations i.e. test data for each node.
>> >>
>> >> OK.
>> >>
>> >> > So, let's summarize the discussion:
>> >> > - Let user specify the tablespace path in
>> >> > test_advanced_config.json.in
>> >>
>> >> No - test_config.py. It should be per-server.
>> >
>> > We don't have a file named 'test_config.py' but we have a server's
>> > credential file named 'test_config.json'.
>> > So, you are saying the tablespace path to be added in
>> > 'test_config.json'.
>> > Am I correct?
>>
>> Yeah, sorry. It should be a property of the server configuration.
>>
>>
>> --
>> 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 - applied with some minor wording and README tweaks. On Tue, Aug 9, 2016 at 10:19 AM, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote: > Hi Dave, > > On Mon, Aug 8, 2016 at 9:15 PM, Dave Page <dave.page@enterprisedb.com> > wrote: >> >> Hi >> >> I guess you need to test if tablespace_path is omitted, not just empty? > > Yes, thats right.. Please find the updated patch. >> >> >> This function test the add tablespace scenario (Check Tablespace Node) ... >> ERROR >> >> ====================================================================== >> ERROR: setUpClass >> >> (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_put.py", >> line 48, in setUpClass >> cls.server_group, cls.server_ids) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 122, in add_table_space >> data = get_tablespace_data(server_connect) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 41, in get_tablespace_data >> config_test_data['spc_location'] = server_config['tablespace_path'] >> KeyError: 'tablespace_path' >> >> ====================================================================== >> ERROR: setUpClass >> >> (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_delete.py", >> line 46, in setUpClass >> cls.server_group, cls.server_ids) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 122, in add_table_space >> data = get_tablespace_data(server_connect) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 41, in get_tablespace_data >> config_test_data['spc_location'] = server_config['tablespace_path'] >> KeyError: 'tablespace_path' >> >> ====================================================================== >> ERROR: setUpClass >> >> (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_get.py", >> line 45, in setUpClass >> cls.server_group, cls.server_ids) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 122, in add_table_space >> data = get_tablespace_data(server_connect) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 41, in get_tablespace_data >> config_test_data['spc_location'] = server_config['tablespace_path'] >> KeyError: 'tablespace_path' >> >> ====================================================================== >> ERROR: runTest >> (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase) >> This function test the add tablespace scenario (Check Tablespace Node) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_add.py", >> line 47, in runTest >> self.server_ids) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 122, in add_table_space >> data = get_tablespace_data(server_connect) >> File >> "/Users/dpage/git/pgadmin4/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py", >> line 41, in get_tablespace_data >> config_test_data['spc_location'] = server_config['tablespace_path'] >> KeyError: 'tablespace_path' >> >> ---------------------------------------------------------------------- >> Ran 14 tests in 9.326s >> >> FAILED (errors=4) >> >> On Mon, Aug 8, 2016 at 3:07 PM, Navnath Gadakh >> <navnath.gadakh@enterprisedb.com> wrote: >> > Hi Dave, >> > Please find the updated patch for API unit test cases for Roles and >> > Tablespaces nodes >> > As we finalized >> > Now, >> > 1. The user will specify the tablespace path in test_config.json.in >> > 2. If tablespace path not found, skip the test cases for that >> > server(Only tablespace test cases) >> > 3. Add the skipped test summary in the test result. (Now it's >> > showing on >> > console + in log file, but need to update in a final enhanced test >> > summary >> > report. Which is research point we will work on that after finishing all >> > nodes API test cases) >> > 4. Removed the test_ prefix from the values in the config files. >> > >> > Thanks! >> > >> > >> > On Thu, Aug 4, 2016 at 5:55 PM, Dave Page <dave.page@enterprisedb.com> >> > wrote: >> >> >> >> On Thu, Aug 4, 2016 at 1:02 PM, Navnath Gadakh >> >> <navnath.gadakh@enterprisedb.com> wrote: >> >> > Hi Dave, >> >> > >> >> > On Thu, Aug 4, 2016 at 4:04 PM, Dave Page >> >> > <dave.page@enterprisedb.com> >> >> > wrote: >> >> >> >> >> >> Hi >> >> >> >> >> >> On Thu, Aug 4, 2016 at 10:27 AM, Navnath Gadakh >> >> >> <navnath.gadakh@enterprisedb.com> wrote: >> >> >> >> >> >> >> Oh - does the per-server config override the main config? That's >> >> >> >> useful. So anything that's in test_advanced_config.py can be >> >> >> >> overridden on a per-server basis in test_config.py? >> >> >> > >> >> >> > No. >> >> >> > per-server i.e advance config(test_advanced_config.json.in) >> >> >> > and >> >> >> > main >> >> >> > config(test_config.json) both are different files. In main config >> >> >> > we >> >> >> > just >> >> >> > mention the server’s credentials.(We can also mention per server >> >> >> > credentails) and in test_advanced_config.json.in(here we say >> >> >> > per-server >> >> >> > config) >> >> >> > we mention the advanced configurations i.e. test data for each >> >> >> > node. >> >> >> >> >> >> OK. >> >> >> >> >> >> > So, let's summarize the discussion: >> >> >> > - Let user specify the tablespace path in >> >> >> > test_advanced_config.json.in >> >> >> >> >> >> No - test_config.py. It should be per-server. >> >> > >> >> > We don't have a file named 'test_config.py' but we have a >> >> > server's >> >> > credential file named 'test_config.json'. >> >> > So, you are saying the tablespace path to be added in >> >> > 'test_config.json'. >> >> > Am I correct? >> >> >> >> Yeah, sorry. It should be a property of the server configuration. >> >> >> >> >> >> -- >> >> 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