Обсуждение: Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

Поиск
Список
Период
Сортировка

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:
Hi Dave,

Please find attached patch for database child nodes and trigger function node.
There are few changes made in trigger function test cases w.r.t. event trigger which added in patch attached.

You can run testcases using following commands:

 For all nodes
      python regression/runtests.py

For casts:
           python regression/runtests.py --pkg browser.server_groups.servers.databases.casts

For Event Triggers:
          python regression/runtests.py --pkg browser.server_groups.servers.databases.event_triggers

For Extensions:
    python regression/runtests.py --pkg browser.server_groups.servers.databases.extensions

For Foreign data wrappers
    python runtests.py --pkg browser.server_groups.servers.databases.foreign_data_wrappers

For foreign servers:
    python runtests.py --pkg browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers

For user mapping:
   python runtests.py --pkg browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers_user_mapping

Let me know for any modifications.





On 16 August 2016 at 18:08, Navnath Gadakh <navnath.gadakh@enterprisedb.com> wrote:
Hi Dave,
      Currently I am working on that. Will send it in the next patch.

Thanks!


On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave.page@enterprisedb.com> wrote:
Thanks - applied!

Can you please work on the following ASAP?

- Removal of encoded credentials from the SMTP test output.
- Summary display as discussed.

Thanks again.

On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
<navnath.gadakh@enterprisedb.com> wrote:
> Hi Dave,
>      Please find the patch for API unit test cases for Schema and its
> sub-nodes (Collations and Trigger functions).
> You can run testsuite using the following commands
>   For schemas
>       python regression/runtests.py --pkg
> browser.server_groups.servers.databases.schemas
>  For Collations
>       python regression/runtests.py --pkg
> browser.server_groups.servers.databases.schemas.collations
>   For Trigger functions
>       python regression/runtests.py --pkg
> browser.server_groups.servers.databases.schemas.functions
>   For all nodes
>       python regression/runtests.py
>
>  Thanks!
>
>
>
> On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <dave.page@enterprisedb.com>
> wrote:
>>
>> 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
>
>
>
>
> --
> 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 





--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Вложения

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Dave Page
Дата:
Hi

I'm seeing a lot of failures with these tests. It looks like an
ordering issue, as (from what I can see) they're all failures to drop
objects due to dependencies.

I've attached the log.

On Thu, Aug 18, 2016 at 9:54 AM, Priyanka Shendge
<priyanka.shendge@enterprisedb.com> wrote:
> Hi Dave,
>
> Please find attached patch for database child nodes and trigger function
> node.
> There are few changes made in trigger function test cases w.r.t. event
> trigger which added in patch attached.
>
> You can run testcases using following commands:
>
>  For all nodes
>       python regression/runtests.py
>
> For casts:
>            python regression/runtests.py --pkg
> browser.server_groups.servers.databases.casts
>
> For Event Triggers:
>           python regression/runtests.py --pkg
> browser.server_groups.servers.databases.event_triggers
>
> For Extensions:
>     python regression/runtests.py --pkg
> browser.server_groups.servers.databases.extensions
>
> For Foreign data wrappers
>     python runtests.py --pkg
> browser.server_groups.servers.databases.foreign_data_wrappers
>
> For foreign servers:
>     python runtests.py --pkg
> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers
>
> For user mapping:
>    python runtests.py --pkg
> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers_user_mapping
>
> Let me know for any modifications.
>
>
>
>
>
> On 16 August 2016 at 18:08, Navnath Gadakh <navnath.gadakh@enterprisedb.com>
> wrote:
>>
>> Hi Dave,
>>       Currently I am working on that. Will send it in the next patch.
>>
>> Thanks!
>>
>>
>> On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave.page@enterprisedb.com>
>> wrote:
>>>
>>> Thanks - applied!
>>>
>>> Can you please work on the following ASAP?
>>>
>>> - Removal of encoded credentials from the SMTP test output.
>>> - Summary display as discussed.
>>>
>>> Thanks again.
>>>
>>> On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
>>> <navnath.gadakh@enterprisedb.com> wrote:
>>> > Hi Dave,
>>> >      Please find the patch for API unit test cases for Schema and its
>>> > sub-nodes (Collations and Trigger functions).
>>> > You can run testsuite using the following commands
>>> >   For schemas
>>> >       python regression/runtests.py --pkg
>>> > browser.server_groups.servers.databases.schemas
>>> >  For Collations
>>> >       python regression/runtests.py --pkg
>>> > browser.server_groups.servers.databases.schemas.collations
>>> >   For Trigger functions
>>> >       python regression/runtests.py --pkg
>>> > browser.server_groups.servers.databases.schemas.functions
>>> >   For all nodes
>>> >       python regression/runtests.py
>>> >
>>> >  Thanks!
>>> >
>>> >
>>> >
>>> > On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <dave.page@enterprisedb.com>
>>> > wrote:
>>> >>
>>> >> 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
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > 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
>>
>>
>
>
>
> --
> Best,
> Priyanka
>
> EnterpriseDB Corporation
> The Enterprise PostgreSQL Company



--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

Вложения

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Dave Page
Дата:
I also have been left with 159(!) databases across my three test
servers as a result of these failures.

Please ensure that cleanup is fixed as a matter of priority - we
should always remove test databases.

Sidenote: Why are we creating so many? It would be *far* more
efficient to create just one for each test run wouldn't it?

On Fri, Aug 19, 2016 at 10:39 AM, Dave Page <dave.page@enterprisedb.com> wrote:
> Hi
>
> I'm seeing a lot of failures with these tests. It looks like an
> ordering issue, as (from what I can see) they're all failures to drop
> objects due to dependencies.
>
> I've attached the log.
>
> On Thu, Aug 18, 2016 at 9:54 AM, Priyanka Shendge
> <priyanka.shendge@enterprisedb.com> wrote:
>> Hi Dave,
>>
>> Please find attached patch for database child nodes and trigger function
>> node.
>> There are few changes made in trigger function test cases w.r.t. event
>> trigger which added in patch attached.
>>
>> You can run testcases using following commands:
>>
>>  For all nodes
>>       python regression/runtests.py
>>
>> For casts:
>>            python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.casts
>>
>> For Event Triggers:
>>           python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.event_triggers
>>
>> For Extensions:
>>     python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.extensions
>>
>> For Foreign data wrappers
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers
>>
>> For foreign servers:
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers
>>
>> For user mapping:
>>    python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers_user_mapping
>>
>> Let me know for any modifications.
>>
>>
>>
>>
>>
>> On 16 August 2016 at 18:08, Navnath Gadakh <navnath.gadakh@enterprisedb.com>
>> wrote:
>>>
>>> Hi Dave,
>>>       Currently I am working on that. Will send it in the next patch.
>>>
>>> Thanks!
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave.page@enterprisedb.com>
>>> wrote:
>>>>
>>>> Thanks - applied!
>>>>
>>>> Can you please work on the following ASAP?
>>>>
>>>> - Removal of encoded credentials from the SMTP test output.
>>>> - Summary display as discussed.
>>>>
>>>> Thanks again.
>>>>
>>>> On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
>>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>> > Hi Dave,
>>>> >      Please find the patch for API unit test cases for Schema and its
>>>> > sub-nodes (Collations and Trigger functions).
>>>> > You can run testsuite using the following commands
>>>> >   For schemas
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas
>>>> >  For Collations
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.collations
>>>> >   For Trigger functions
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.functions
>>>> >   For all nodes
>>>> >       python regression/runtests.py
>>>> >
>>>> >  Thanks!
>>>> >
>>>> >
>>>> >
>>>> > On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <dave.page@enterprisedb.com>
>>>> > wrote:
>>>> >>
>>>> >> 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
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > 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
>>>
>>>
>>
>>
>>
>> --
>> Best,
>> Priyanka
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake



--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:


On 19 August 2016 at 15:17, Dave Page <dave.page@enterprisedb.com> wrote:
I also have been left with 159(!) databases across my three test
servers as a result of these failures.

Please ensure that cleanup is fixed as a matter of priority - we
should always remove test databases.

Yes, in tearDownClass() cleanup process is been taken care, as its failing in   
tearDownClass() it failed to cleanup or remove databases/other dependant nodes created.

Sidenote: Why are we creating so many? It would be *far* more
efficient to create just one for each test run wouldn't it?

Correct. As of now its creating and deleting dependant node/object for each test case.
Navnath will work on it to enhance the current behaviour.

On Fri, Aug 19, 2016 at 10:39 AM, Dave Page <dave.page@enterprisedb.com> wrote:
> Hi
>
> I'm seeing a lot of failures with these tests. It looks like an
> ordering issue, as (from what I can see) they're all failures to drop
> objects due to dependencies.
>
> I've attached the log.
>
> On Thu, Aug 18, 2016 at 9:54 AM, Priyanka Shendge
> <priyanka.shendge@enterprisedb.com> wrote:
>> Hi Dave,
>>
>> Please find attached patch for database child nodes and trigger function
>> node.
>> There are few changes made in trigger function test cases w.r.t. event
>> trigger which added in patch attached.
>>
>> You can run testcases using following commands:
>>
>>  For all nodes
>>       python regression/runtests.py
>>
>> For casts:
>>            python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.casts
>>
>> For Event Triggers:
>>           python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.event_triggers
>>
>> For Extensions:
>>     python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.extensions
>>
>> For Foreign data wrappers
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers
>>
>> For foreign servers:
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers
>>
>> For user mapping:
>>    python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers_user_mapping
>>
>> Let me know for any modifications.
>>
>>
>>
>>
>>
>> On 16 August 2016 at 18:08, Navnath Gadakh <navnath.gadakh@enterprisedb.com>
>> wrote:
>>>
>>> Hi Dave,
>>>       Currently I am working on that. Will send it in the next patch.
>>>
>>> Thanks!
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave.page@enterprisedb.com>
>>> wrote:
>>>>
>>>> Thanks - applied!
>>>>
>>>> Can you please work on the following ASAP?
>>>>
>>>> - Removal of encoded credentials from the SMTP test output.
>>>> - Summary display as discussed.
>>>>
>>>> Thanks again.
>>>>
>>>> On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
>>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>> > Hi Dave,
>>>> >      Please find the patch for API unit test cases for Schema and its
>>>> > sub-nodes (Collations and Trigger functions).
>>>> > You can run testsuite using the following commands
>>>> >   For schemas
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas
>>>> >  For Collations
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.collations
>>>> >   For Trigger functions
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.functions
>>>> >   For all nodes
>>>> >       python regression/runtests.py
>>>> >
>>>> >  Thanks!
>>>> >
>>>> >
>>>> >
>>>> > On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <dave.page@enterprisedb.com>
>>>> > wrote:
>>>> >>
>>>> >> 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
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > 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
>>>
>>>
>>
>>
>>
>> --
>> Best,
>> Priyanka
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake



--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:
Hi Dave,

PFA patch for schema and database child nodes.  I have divided the patch into 2 different patches now.
Can you please delete "parent_id.pkl" file if exist then apply and run schema_and_nodes.patch first as
db_nodes.patch is dependent on schema_and_nodes.patch.

Thank you.

On 22 August 2016 at 17:51, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:
Hi Dave,

PFA patch for schema and database child nodes.  I have divided the patch into 2 different patches now.
Can you please delete "parent_id.pkl" file if exist then apply and run schema_and_nodes.patch first as
db_nodes.patch is dependent on schema_and_nodes.patch.

Thank you.

On 19 August 2016 at 15:29, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:


On 19 August 2016 at 15:17, Dave Page <dave.page@enterprisedb.com> wrote:
I also have been left with 159(!) databases across my three test
servers as a result of these failures.

Please ensure that cleanup is fixed as a matter of priority - we
should always remove test databases.

Yes, in tearDownClass() cleanup process is been taken care, as its failing in   
tearDownClass() it failed to cleanup or remove databases/other dependant nodes created.

Sidenote: Why are we creating so many? It would be *far* more
efficient to create just one for each test run wouldn't it?

Correct. As of now its creating and deleting dependant node/object for each test case.
Navnath will work on it to enhance the current behaviour.

On Fri, Aug 19, 2016 at 10:39 AM, Dave Page <dave.page@enterprisedb.com> wrote:
> Hi
>
> I'm seeing a lot of failures with these tests. It looks like an
> ordering issue, as (from what I can see) they're all failures to drop
> objects due to dependencies.
>
> I've attached the log.
>
> On Thu, Aug 18, 2016 at 9:54 AM, Priyanka Shendge
> <priyanka.shendge@enterprisedb.com> wrote:
>> Hi Dave,
>>
>> Please find attached patch for database child nodes and trigger function
>> node.
>> There are few changes made in trigger function test cases w.r.t. event
>> trigger which added in patch attached.
>>
>> You can run testcases using following commands:
>>
>>  For all nodes
>>       python regression/runtests.py
>>
>> For casts:
>>            python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.casts
>>
>> For Event Triggers:
>>           python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.event_triggers
>>
>> For Extensions:
>>     python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.extensions
>>
>> For Foreign data wrappers
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers
>>
>> For foreign servers:
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers
>>
>> For user mapping:
>>    python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers_user_mapping
>>
>> Let me know for any modifications.
>>
>>
>>
>>
>>
>> On 16 August 2016 at 18:08, Navnath Gadakh <navnath.gadakh@enterprisedb.com>
>> wrote:
>>>
>>> Hi Dave,
>>>       Currently I am working on that. Will send it in the next patch.
>>>
>>> Thanks!
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave.page@enterprisedb.com>
>>> wrote:
>>>>
>>>> Thanks - applied!
>>>>
>>>> Can you please work on the following ASAP?
>>>>
>>>> - Removal of encoded credentials from the SMTP test output.
>>>> - Summary display as discussed.
>>>>
>>>> Thanks again.
>>>>
>>>> On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
>>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>> > Hi Dave,
>>>> >      Please find the patch for API unit test cases for Schema and its
>>>> > sub-nodes (Collations and Trigger functions).
>>>> > You can run testsuite using the following commands
>>>> >   For schemas
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas
>>>> >  For Collations
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.collations
>>>> >   For Trigger functions
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.functions
>>>> >   For all nodes
>>>> >       python regression/runtests.py
>>>> >
>>>> >  Thanks!
>>>> >
>>>> >
>>>> >
>>>> > On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <dave.page@enterprisedb.com>
>>>> > wrote:
>>>> >>
>>>> >> 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
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > 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
>>>
>>>
>>
>>
>>
>> --
>> Best,
>> Priyanka
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake



--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company




--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company




--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Вложения

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:
Hi Dave,

PFA patch for schema and database child nodes.  I have divided the patch into 2 different patches now.
Can you please delete "parent_id.pkl" file if exist then apply and run schema_and_nodes.patch first as
db_nodes.patch is dependent on schema_and_nodes.patch.

Thank you.

On 19 August 2016 at 15:29, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:


On 19 August 2016 at 15:17, Dave Page <dave.page@enterprisedb.com> wrote:
I also have been left with 159(!) databases across my three test
servers as a result of these failures.

Please ensure that cleanup is fixed as a matter of priority - we
should always remove test databases.

Yes, in tearDownClass() cleanup process is been taken care, as its failing in   
tearDownClass() it failed to cleanup or remove databases/other dependant nodes created.

Sidenote: Why are we creating so many? It would be *far* more
efficient to create just one for each test run wouldn't it?

Correct. As of now its creating and deleting dependant node/object for each test case.
Navnath will work on it to enhance the current behaviour.

On Fri, Aug 19, 2016 at 10:39 AM, Dave Page <dave.page@enterprisedb.com> wrote:
> Hi
>
> I'm seeing a lot of failures with these tests. It looks like an
> ordering issue, as (from what I can see) they're all failures to drop
> objects due to dependencies.
>
> I've attached the log.
>
> On Thu, Aug 18, 2016 at 9:54 AM, Priyanka Shendge
> <priyanka.shendge@enterprisedb.com> wrote:
>> Hi Dave,
>>
>> Please find attached patch for database child nodes and trigger function
>> node.
>> There are few changes made in trigger function test cases w.r.t. event
>> trigger which added in patch attached.
>>
>> You can run testcases using following commands:
>>
>>  For all nodes
>>       python regression/runtests.py
>>
>> For casts:
>>            python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.casts
>>
>> For Event Triggers:
>>           python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.event_triggers
>>
>> For Extensions:
>>     python regression/runtests.py --pkg
>> browser.server_groups.servers.databases.extensions
>>
>> For Foreign data wrappers
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers
>>
>> For foreign servers:
>>     python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers
>>
>> For user mapping:
>>    python runtests.py --pkg
>> browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers_user_mapping
>>
>> Let me know for any modifications.
>>
>>
>>
>>
>>
>> On 16 August 2016 at 18:08, Navnath Gadakh <navnath.gadakh@enterprisedb.com>
>> wrote:
>>>
>>> Hi Dave,
>>>       Currently I am working on that. Will send it in the next patch.
>>>
>>> Thanks!
>>>
>>>
>>> On Tue, Aug 16, 2016 at 6:05 PM, Dave Page <dave.page@enterprisedb.com>
>>> wrote:
>>>>
>>>> Thanks - applied!
>>>>
>>>> Can you please work on the following ASAP?
>>>>
>>>> - Removal of encoded credentials from the SMTP test output.
>>>> - Summary display as discussed.
>>>>
>>>> Thanks again.
>>>>
>>>> On Fri, Aug 12, 2016 at 10:40 AM, Navnath Gadakh
>>>> <navnath.gadakh@enterprisedb.com> wrote:
>>>> > Hi Dave,
>>>> >      Please find the patch for API unit test cases for Schema and its
>>>> > sub-nodes (Collations and Trigger functions).
>>>> > You can run testsuite using the following commands
>>>> >   For schemas
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas
>>>> >  For Collations
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.collations
>>>> >   For Trigger functions
>>>> >       python regression/runtests.py --pkg
>>>> > browser.server_groups.servers.databases.schemas.functions
>>>> >   For all nodes
>>>> >       python regression/runtests.py
>>>> >
>>>> >  Thanks!
>>>> >
>>>> >
>>>> >
>>>> > On Tue, Aug 9, 2016 at 8:36 PM, Dave Page <dave.page@enterprisedb.com>
>>>> > wrote:
>>>> >>
>>>> >> 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
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > 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
>>>
>>>
>>
>>
>>
>> --
>> Best,
>> Priyanka
>>
>> EnterpriseDB Corporation
>> The Enterprise PostgreSQL Company
>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake



--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company




--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Вложения

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Dave Page
Дата:
Hi

On Mon, Aug 22, 2016 at 1:42 PM, Priyanka Shendge
<priyanka.shendge@enterprisedb.com> wrote:
> Hi Dave,
>
> PFA patch for schema and database child nodes.  I have divided the patch
> into 2 different patches now.
> Can you please delete "parent_id.pkl" file if exist then apply and run
> schema_and_nodes.patch first as
> db_nodes.patch is dependent on schema_and_nodes.patch.

Thanks - applied.

I noticed whilst testing that I've started seeing the error below
(with or without the patches I just applied). Any idea what's causing
it?

(pgadmin4)piranha:pgadmin4 dpage$ python web/regression/runtests.py
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
This function test the add role scenario (Check Role Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_add.EventTriggerAddTestCase)
This function will add event trigger under database node. (Fetch Event
Trigger Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_get.ForeignServerGetTestCase)
This function will fetch foreign server under FDW node. (Check FSRV Node) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (TestCase for Checking
Invalid_Password) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Empty_Password) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Empty_Email) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Empty_Credentials) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Invalid_Email) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Invalid_Credentials) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Valid_Credentials) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase)
This function will update added cast. (Check Cast Node) ... ok
runTest (pgadmin.browser.tests.test_logout.LogoutTest)
This function checks the logout functionality. (Logging Out) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_add.ExtensionsAddTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_add.FDWDAddTestCase)
This function will add extension under 1st server of tree node. (Check
FDW Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase)
This function will add cast under database node. (Check Cast Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_delete.CollationDeleteTestCase)
This function will delete collation under schema node. (Fetch
collation Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_get.SequenceGetTestCase)
This function will fetch added sequence under schema node. (Fetch
sequence Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_delete.TriggerFuncDeleteTestCase)
This function will delete trigger function under database node. (Fetch
Trigger Function Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_put.EventTriggerPutTestCase)
This function will update event trigger under database node. (Fetch
Event Trigger Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
This function will fetch the added servers to object browser. (Default
Server Node url) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_delete.EventTriggerDeleteTestCase)
This function will delete event trigger under database node. (Fetch
Event Trigger Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
This function tests the update role data scenario (Check Role Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_get.UserMappingGetTestCase)
This function will fetch user mapping added to foreign server (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_put.ExtensionsPutTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_add.TriggerFuncAddTestCase)
This function will add trigger function under schema node. (Fetch
Trigger Function Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
This function test the get table space scenario (Check Tablespace Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_put.ForeignServerPutTestCase)
This function will update foreign server under FDW node. (Check FSRV
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
This function test the get role scenario (Check Role Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
This function will fetch added database. (Check Dat abases Node URL) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating Incorrect_New_Password) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating New_Password_Less_Than_Min_Length) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating Empty_New_Password) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating Incorrect_Current_Password) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Changing Valid_Password) ... ERROR
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_get.ExtensionsGetTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
This function will add the server under default server group. (Default
Server Node url) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
This function will delete schema under database node. (Check Schema
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_add.SequenceAddTestCase)
This function will add sequence(s) under schema node. (Fetch sequence
Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_put.TriggerFuncPutTestCase)
This function will update trigger function under database node. (Fetch
Trigger Function Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_delete.UserMappingDeleteTestCase)
This function delete user mapping under foreign server node. (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
This function will add database under 1st server of tree node. (Check
Databases Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_delete.FDWDDeleteTestCase)
This function will delete added FDW. (Check FDW Node) ... ok
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
This function tests the delete role scenario (Check Role Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
This function will update the comments field of database. (Check
Databases Node) ... ok
runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
This function checks reset password functionality. (TestCase for
Validating Empty Email) ... ok
runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
This function checks reset password functionality. (TestCase for
Validating Invalid_Email) ... ok
runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
This function checks reset password functionality. (TestCase for
Validating Valid_Email) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
This function tests the update tablespace data scenario (Check
Tablespace Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
This function will delete schema under database node. (Check Schema
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
This function tests the delete table space scenario (Check Tablespace
Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_put.UserMappingPutTestCase)
This function update user mapping under foreign server node. (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_add.SchemaAddTestCase)
This function will add schema under database node. (Check Schema Node
URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase)
This function will delete added cast(s). (Check Cast Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_get.CollationGetTestCase)
This function will fetch collation under schema node. (Fetch collation
Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_put.CollationPutTestCase)
This function will update collation under schema node. (Fetch
collation Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_delete.ForeignServerDeleteTestCase)
This function will delete foreign server under FDW node. (Check FSRV
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_delete.SchemaDeleteTestCase)
This function will delete schema under database node. (Check Schema
Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_delete.ExtensionsDeleteTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
This function test the add tablespace scenario (Check Tablespace Node) ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
This function will check available server groups. (Check Server Group
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_put.SequencePutTestCase)
This function will update added sequence under schema node. (Fetch
sequence Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase)
This function will get added cast. (Check Cast Node) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
This function will update the server's comment field. (Default Server
Node url) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
This function will get all available servers under object browser
(Default Server Node url) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_get.TriggerFuncGetTestCase)
This function will delete trigger function under database node. (Fetch
Trigger Function Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_put.FDWDPutTestCase)
This function will update added FDW. (Check FDW Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_delete.SequenceDeleteTestCase)
This function will delete added sequence under schema node. (Fetch
sequence Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
This function will delete the database. (Check Databases Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_add.UserMappingAddTestCase)
This function will add user mapping under foreign server node. (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_get.FDWDGetTestCase)
This function will get added FDW. (Check FDW Node) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_get.EventTriggerGetTestCase)
This function will fetch event trigger under database node. (Fetch
Event Trigger Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_add.CollationAddTestCase)
This function will add collation under schema node. (Default Node URL) ... ok
runTest
(pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_add.ForeignServerAddTestCase)
This function will add foreign server under database node. (Check FSRV
Node) ... ok

======================================================================
ERROR: runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Changing Valid_Password)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_change_password.py",
line 91, in runTest
    user_id = json.loads(response.data.decode('utf-8'))['id']
KeyError: 'id'

----------------------------------------------------------------------
Ran 73 tests in 89.574s

FAILED (errors=1)
Please check output in file:
/Users/dpage/git/pgadmin4/web/regression/regression.log

--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:
I noticed whilst testing that I've started seeing the error below
(with or without the patches I just applied). Any idea what's causing
it?

The user may already present in database (i.e. abc@EXAMPLE.COM) which we creating as dummy user.
When we run test case it tries to create dummy user. As user is already present it throws an error.
It does not get an id for same user.


On 23 August 2016 at 17:05, Dave Page <dave.page@enterprisedb.com> wrote:
Hi

On Mon, Aug 22, 2016 at 1:42 PM, Priyanka Shendge
<priyanka.shendge@enterprisedb.com> wrote:
> Hi Dave,
>
> PFA patch for schema and database child nodes.  I have divided the patch
> into 2 different patches now.
> Can you please delete "parent_id.pkl" file if exist then apply and run
> schema_and_nodes.patch first as
> db_nodes.patch is dependent on schema_and_nodes.patch.

Thanks - applied.

I noticed whilst testing that I've started seeing the error below
(with or without the patches I just applied). Any idea what's causing
it?

(pgadmin4)piranha:pgadmin4 dpage$ python web/regression/runtests.py
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_add.LoginRoleAddTestCase)
This function test the add role scenario (Check Role Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_add.EventTriggerAddTestCase)
This function will add event trigger under database node. (Fetch Event
Trigger Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_get.ForeignServerGetTestCase)
This function will fetch foreign server under FDW node. (Check FSRV Node) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (TestCase for Checking
Invalid_Password) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Empty_Password) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Empty_Email) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Empty_Credentials) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Invalid_Email) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Invalid_Credentials) ... ok
runTest (pgadmin.browser.tests.test_login.LoginTestCase)
This function checks login functionality. (Valid_Credentials) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_put.CastsPutTestCase)
This function will update added cast. (Check Cast Node) ... ok
runTest (pgadmin.browser.tests.test_logout.LogoutTest)
This function checks the logout functionality. (Logging Out) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_add.ExtensionsAddTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_add.FDWDAddTestCase)
This function will add extension under 1st server of tree node. (Check
FDW Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_add.CastsAddTestCase)
This function will add cast under database node. (Check Cast Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_delete.CollationDeleteTestCase)
This function will delete collation under schema node. (Fetch
collation Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_get.SequenceGetTestCase)
This function will fetch added sequence under schema node. (Fetch
sequence Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_delete.TriggerFuncDeleteTestCase)
This function will delete trigger function under database node. (Fetch
Trigger Function Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_put.EventTriggerPutTestCase)
This function will update event trigger under database node. (Fetch
Event Trigger Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_get.ServersGetTestCase)
This function will fetch the added servers to object browser. (Default
Server Node url) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_delete.EventTriggerDeleteTestCase)
This function will delete event trigger under database node. (Fetch
Event Trigger Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_put.LoginRolePutTestCase)
This function tests the update role data scenario (Check Role Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_get.UserMappingGetTestCase)
This function will fetch user mapping added to foreign server (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_put.ExtensionsPutTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_add.TriggerFuncAddTestCase)
This function will add trigger function under schema node. (Fetch
Trigger Function Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_get.TablespaceGetTestCase)
This function test the get table space scenario (Check Tablespace Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_put.ForeignServerPutTestCase)
This function will update foreign server under FDW node. (Check FSRV
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_get.LoginRoleGetTestCase)
This function test the get role scenario (Check Role Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_get.DatabasesGetTestCase)
This function will fetch added database. (Check Dat abases Node URL) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating Incorrect_New_Password) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating New_Password_Less_Than_Min_Length) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating Empty_New_Password) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Validating Incorrect_Current_Password) ... ok
runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Changing Valid_Password) ... ERROR
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_get.ExtensionsGetTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_add.ServersAddTestCase)
This function will add the server under default server group. (Default
Server Node url) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_get.SchemaGetTestCase)
This function will delete schema under database node. (Check Schema
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_add.SequenceAddTestCase)
This function will add sequence(s) under schema node. (Fetch sequence
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_put.TriggerFuncPutTestCase)
This function will update trigger function under database node. (Fetch
Trigger Function Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_delete.UserMappingDeleteTestCase)
This function delete user mapping under foreign server node. (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_add.DatabaseAddTestCase)
This function will add database under 1st server of tree node. (Check
Databases Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_delete.FDWDDeleteTestCase)
This function will delete added FDW. (Check FDW Node) ... ok
runTest (pgadmin.browser.server_groups.servers.roles.tests.test_role_delete.LoginRoleDeleteTestCase)
This function tests the delete role scenario (Check Role Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_put.DatabasesUpdateTestCase)
This function will update the comments field of database. (Check
Databases Node) ... ok
runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
This function checks reset password functionality. (TestCase for
Validating Empty Email) ... ok
runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
This function checks reset password functionality. (TestCase for
Validating Invalid_Email) ... ok
runTest (pgadmin.browser.tests.test_reset_password.ResetPasswordTestCase)
This function checks reset password functionality. (TestCase for
Validating Valid_Email) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_put.TableSpaceUpdateTestCase)
This function tests the update tablespace data scenario (Check
Tablespace Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_put.SchemaPutTestCase)
This function will delete schema under database node. (Check Schema
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_delete.TableSpaceDeleteTestCase)
This function tests the delete table space scenario (Check Tablespace
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_put.UserMappingPutTestCase)
This function update user mapping under foreign server node. (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_add.SchemaAddTestCase)
This function will add schema under database node. (Check Schema Node
URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_delete.CastsDeleteTestCase)
This function will delete added cast(s). (Check Cast Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_get.CollationGetTestCase)
This function will fetch collation under schema node. (Fetch collation
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_put.CollationPutTestCase)
This function will update collation under schema node. (Fetch
collation Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_delete.ForeignServerDeleteTestCase)
This function will delete foreign server under FDW node. (Check FSRV
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.tests.test_schema_delete.SchemaDeleteTestCase)
This function will delete schema under database node. (Check Schema
Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.extensions.tests.test_extension_delete.ExtensionsDeleteTestCase)
This function will add extension under 1st server of tree node. (Check
Extension Node) ... ok
runTest (pgadmin.browser.server_groups.servers.tablespaces.tests.test_tbspc_add.TableSpaceAddTestCase)
This function test the add tablespace scenario (Check Tablespace Node) ... ok
runTest (pgadmin.browser.server_groups.tests.test_sg_get.SgNodeTestCase)
This function will check available server groups. (Check Server Group
Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_put.SequencePutTestCase)
This function will update added sequence under schema node. (Fetch
sequence Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.casts.tests.test_cast_get.CastsGetTestCase)
This function will get added cast. (Check Cast Node) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_put.ServerUpdateTestCase)
This function will update the server's comment field. (Default Server
Node url) ... ok
runTest (pgadmin.browser.server_groups.servers.tests.test_server_delete.ServerDeleteTestCase)
This function will get all available servers under object browser
(Default Server Node url) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.functions.tests.test_trigger_func_get.TriggerFuncGetTestCase)
This function will delete trigger function under database node. (Fetch
Trigger Function Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_put.FDWDPutTestCase)
This function will update added FDW. (Check FDW Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.sequences.tests.test_sequence_delete.SequenceDeleteTestCase)
This function will delete added sequence under schema node. (Fetch
sequence Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.tests.test_db_delete.DatabaseDeleteTestCase)
This function will delete the database. (Check Databases Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.user_mapping.tests.test_user_mapping_add.UserMappingAddTestCase)
This function will add user mapping under foreign server node. (Check
user mapping Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.tests.test_FDW_get.FDWDGetTestCase)
This function will get added FDW. (Check FDW Node) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.event_triggers.tests.test_event_trigger_get.EventTriggerGetTestCase)
This function will fetch event trigger under database node. (Fetch
Event Trigger Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.schemas.collations.tests.test_collation_add.CollationAddTestCase)
This function will add collation under schema node. (Default Node URL) ... ok
runTest (pgadmin.browser.server_groups.servers.databases.foreign_data_wrappers.foreign_servers.tests.test_foreign_servers_add.ForeignServerAddTestCase)
This function will add foreign server under database node. (Check FSRV
Node) ... ok

======================================================================
ERROR: runTest (pgadmin.browser.tests.test_change_password.ChangePasswordTestCase)
This function will check change password functionality. (TestCase for
Changing Valid_Password)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/dpage/git/pgadmin4/web/pgadmin/browser/tests/test_change_password.py",
line 91, in runTest
    user_id = json.loads(response.data.decode('utf-8'))['id']
KeyError: 'id'

----------------------------------------------------------------------
Ran 73 tests in 89.574s

FAILED (errors=1)
Please check output in file:
/Users/dpage/git/pgadmin4/web/regression/regression.log

--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Dave Page
Дата:


On Tue, Aug 23, 2016 at 1:56 PM, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:
I noticed whilst testing that I've started seeing the error below
(with or without the patches I just applied). Any idea what's causing
it?

The user may already present in database (i.e. abc@EXAMPLE.COM) which we creating as dummy user.
When we run test case it tries to create dummy user. As user is already present it throws an error.
It does not get an id for same user.

Ahh, yes - can you add a check for that so it throws a more helpful error please?

Also; related to the issue I've been seeing with databases not being removed, I recently ran into problems where tablespaces weren't removed, following a ctrl+c, which then required manual cleanup once I'd figured out what was wrong. We need to fix this; I'd suggest:

- Keep track of objects that are created during tests. This probably just needs to be objects to the database level, e.g. pgAdmin users, tablespaces, databases and roles (because, if we drop the test database then everything in it will go anyway).

- Remove objects from the list again if a test drops them.

- Call a function on exit (or abort/ctrl+c/whatever) that iterates through the list of objects that have been created but not dropped, and clean them up manually before exiting. 

Thanks!

--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:


On 23 August 2016 at 18:38, Dave Page <dave.page@enterprisedb.com> wrote:


On Tue, Aug 23, 2016 at 1:56 PM, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:
I noticed whilst testing that I've started seeing the error below
(with or without the patches I just applied). Any idea what's causing
it?

The user may already present in database (i.e. abc@EXAMPLE.COM) which we creating as dummy user.
When we run test case it tries to create dummy user. As user is already present it throws an error.
It does not get an id for same user.

Ahh, yes - can you add a check for that so it throws a more helpful error please?
 
Sure, i'll update the code accordingly. 

Also; related to the issue I've been seeing with databases not being removed, I recently ran into problems where tablespaces weren't removed, following a ctrl+c, which then required manual cleanup once I'd figured out what was wrong. We need to fix this; I'd suggest:

- Keep track of objects that are created during tests. This probably just needs to be objects to the database level, e.g. pgAdmin users, tablespaces, databases and roles (because, if we drop the test database then everything in it will go anyway).

- Remove objects from the list again if a test drops them.

- Call a function on exit (or abort/ctrl+c/whatever) that iterates through the list of objects that have been created but not dropped, and clean them up manually before exiting. 

Sure, this can be done and will update the code. 
Thank you.

Thanks!

--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Re: pgAdmin IV : Unittest modular patch(database child nodes) and trigger function

От
Priyanka Shendge
Дата:
Hi Dave,

PFA patch for sequence node. I have made few modification to delete operation (added cascade delete)
and added sequence label to pickle dict as synonym is dependant on it.

Thank you. 

On 23 August 2016 at 18:44, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:


On 23 August 2016 at 18:38, Dave Page <dave.page@enterprisedb.com> wrote:


On Tue, Aug 23, 2016 at 1:56 PM, Priyanka Shendge <priyanka.shendge@enterprisedb.com> wrote:
I noticed whilst testing that I've started seeing the error below
(with or without the patches I just applied). Any idea what's causing
it?

The user may already present in database (i.e. abc@EXAMPLE.COM) which we creating as dummy user.
When we run test case it tries to create dummy user. As user is already present it throws an error.
It does not get an id for same user.

Ahh, yes - can you add a check for that so it throws a more helpful error please?
 
Sure, i'll update the code accordingly. 

Also; related to the issue I've been seeing with databases not being removed, I recently ran into problems where tablespaces weren't removed, following a ctrl+c, which then required manual cleanup once I'd figured out what was wrong. We need to fix this; I'd suggest:

- Keep track of objects that are created during tests. This probably just needs to be objects to the database level, e.g. pgAdmin users, tablespaces, databases and roles (because, if we drop the test database then everything in it will go anyway).

- Remove objects from the list again if a test drops them.

- Call a function on exit (or abort/ctrl+c/whatever) that iterates through the list of objects that have been created but not dropped, and clean them up manually before exiting. 

Sure, this can be done and will update the code. 
Thank you.

Thanks!

--
Dave Page
VP, Chief Architect, Tools & Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake



--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company




--
Best,
Priyanka

EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Вложения